From: Michael Prokop Date: Mon, 5 Nov 2007 09:54:10 +0000 (+0100) Subject: Update Purging removed packages in grml_cleanup_chroot X-Git-Tag: 0.0.8~4 X-Git-Url: http://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=173d53d88230d3ca786ac2908bfdafcc5a50f555 Update Purging removed packages in grml_cleanup_chroot --- diff --git a/etc/grml/fai/grml/grml_cleanup_chroot b/etc/grml/fai/grml/grml_cleanup_chroot index 12bd0ae..8eba963 100755 --- a/etc/grml/fai/grml/grml_cleanup_chroot +++ b/etc/grml/fai/grml/grml_cleanup_chroot @@ -52,9 +52,11 @@ einfo "Setting up /etc/inittab" cp /etc/inittab.grml /etc/inittab eend $? -einfo "Purging removed packages" -dpkg --purge $(dpkg --list | awk '/^rc/ { print $2}') -eend $? +if [ "$(dpkg --list | awk '/^rc/ { print $2}')" != '' ] ; + 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"