X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fgrml%2Fgrml_cleanup_chroot;h=4b6df6da9085b28a85aa93b043e30d0f51d3bef1;hb=b68164e384f6c7d682212995fc96ab919a2677f0;hp=b75f55adfc25d60cec4366ff6d4a1705fd97a5b2;hpb=a45be56c42c5da0787a73fad834384c0e82aef13;p=grml-live.git diff --git a/etc/grml/fai/grml/grml_cleanup_chroot b/etc/grml/fai/grml/grml_cleanup_chroot index b75f55a..4b6df6d 100755 --- a/etc/grml/fai/grml/grml_cleanup_chroot +++ b/etc/grml/fai/grml/grml_cleanup_chroot @@ -4,7 +4,7 @@ # Authors: (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Wed Sep 19 13:38:45 CEST 2007 [mika] +# Latest change: Sun Nov 04 12:12:57 CET 2007 [mika] ################################################################################ # misc stuff @@ -52,6 +52,12 @@ einfo "Setting up /etc/inittab" cp /etc/inittab.grml /etc/inittab eend $? +if [ "$(dpkg --list | awk '/^rc/ { print $2}')" != '' ] ; then + einfo "Purging removed packages" + dpkg --purge $(dpkg --list | awk '/^rc/ { print $2}') + eend $? +fi + if [ -x /usr/bin/make -a -r /usr/src/Makefile ] ; then einfo "Cleaning up /usr/src/linux-headers-$KERNEL" ( cd /usr/src @@ -236,7 +242,6 @@ einfo "Cleaning and removing some misc files and directories" /var/lib/games /var/cache/man \ /var/lib/nfs /var/lib/xkb \ /var/mail/grml /var/account/pacct - mkdir -p /etc/sysconfig/network-scripts /etc/sysconfig/provider # Recreate empty utmp and wtmp :>/var/run/utmp :>/var/run/wtmp