From: Michael Prokop Date: Tue, 28 Jun 2011 09:49:36 +0000 (+0200) Subject: DEBORPHAN/98-clean-chroot: Make sure deborphan exists in chroot. X-Git-Tag: v0.15.0~18 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=649b40f7780079f8af4fcd7b12284a7d1d8cccfc DEBORPHAN/98-clean-chroot: Make sure deborphan exists in chroot. --- diff --git a/etc/grml/fai/config/scripts/DEBORPHAN/98-clean-chroot b/etc/grml/fai/config/scripts/DEBORPHAN/98-clean-chroot index a5515f0..f5c1a94 100755 --- a/etc/grml/fai/config/scripts/DEBORPHAN/98-clean-chroot +++ b/etc/grml/fai/config/scripts/DEBORPHAN/98-clean-chroot @@ -9,12 +9,17 @@ set -u set -e +if ! [ -x $target/usr/bin/deborphan ] ; then + echo "Warning: deborphan not installed" + exit 0 +fi + # remove all packages not necessary anymore: $ROOTCMD apt-get -y --purge autoremove # remove packages until deborphan does not find anymore: while [ "$($ROOTCMD deborphan)" != "" ] ; do - $ROOTCMD apt-get -y --purge remove $(deborphan) + $ROOTCMD apt-get -y --purge remove $($ROOTCMD deborphan) done ## END OF FILE #################################################################