X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F98-clean-chroot;h=8b3a8bf8d98e09b6b56dc34908026877e88014cf;hb=12ae9f00e643824c3b28af0f5895d193867048fc;hp=f808c6558c38390a2d98a8547a58ff88260e8214;hpb=99831cee7e2d25fdd2388e95c6b5f4e5e83b948a;p=grml-live.git diff --git a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot index f808c65..8b3a8bf 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot +++ b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot @@ -35,15 +35,20 @@ if $ROOTCMD dpkg-divert --list | grep -q '/usr/sbin/update-grub' ; then $ROOTCMD dpkg-divert --rename --remove /usr/sbin/update-grub fi +# revert dpkg-divert of hooks/instsoft.GRMLBASE, which is +# used to work around a grub-probe<->openvz bug +if $ROOTCMD dpkg-divert --list | grep -q '/usr/sbin/grub-probe' ; then + echo "Undoing dpkg-divert of grub-probe executable" + $ROOTCMD rm -f /usr/sbin/grub-probe + $ROOTCMD dpkg-divert --rename --remove /usr/sbin/grub-probe +fi + # revert udev workaround of hooks/updatebase.GRMLBASE if grep -q 'updatebase.GRMLBASE' ${target}/etc/udev/kernel-upgrade 2>/dev/null ; then echo "Removing /etc/udev/kernel-upgrade created by updatebase.GRMLBASE" $ROOTCMD rm -f /etc/udev/kernel-upgrade fi -echo "Updating package list" -$ROOTCMD apt-get update - echo "Cleaning apt places" $ROOTCMD apt-get check 2>/dev/null $ROOTCMD dpkg --clear-avail @@ -89,9 +94,10 @@ rm -rf --one-file-system $target/etc/sysconfig/* \ $target/etc/*group- $target/var/spool/postfix/maildrop/* \ $target/etc/*.old $target/etc/*.original \ $target/etc/lvm/.cache $target/etc/lvm/cache/.cache \ - $target/etc/lvm/backup/main $target/tmp/* \ + $target/etc/lvm/backup/* $target/tmp/* \ $target/var/tmp/* $target/var/backups/* \ - $target/var/lib/mysql $target/var/log/lilo_log.* $target/core* + $target/var/lib/mysql $target/var/log/lilo_log.* $target/core* \ + $target/etc/blkid.tab # remove only "temporary" or saved files in the given directories nuke(){