X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FDEBORPHAN%2F98-clean-chroot;h=f5c1a942eb0e2b14416e564aa6de0d1d7859a51d;hp=a5515f0638684dfff8670bacd37cc50fa9ba6abb;hb=649b40f7780079f8af4fcd7b12284a7d1d8cccfc;hpb=2889351057eb0804602416659e2732f75a36463f 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 #################################################################