X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F98-clean-chroot;h=8b3a8bf8d98e09b6b56dc34908026877e88014cf;hb=9aa2a9203c13b24ea303c0e022350215dc4a113e;hp=d36013c6af7d572fd2e9a618ec3e92c8ffd7ef4e;hpb=94ef7f994663bcc9cd6553496cd7a46b4182cf91;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 d36013c..8b3a8bf 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot +++ b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot @@ -35,22 +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 "Removing /var/lib/apt/lists/*-stuff, dpkg-status-old and pkgcache.bin" -rm -f $target/var/lib/apt/lists/*Packages \ - $target/var/lib/apt/lists/*Release \ - $target/var/lib/apt/lists/*Sources \ - $target/var/lib/apt/lists/*IndexDiff \ - $target/var/lib/apt/lists/*.gpg \ - $target/var/cache/apt-show-versions/* \ - $target/var/cache/debconf/templates.dat-old \ - $target/var/cache/apt/*.bin - echo "Cleaning apt places" $ROOTCMD apt-get check 2>/dev/null $ROOTCMD dpkg --clear-avail @@ -96,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(){