X-Git-Url: http://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FDEBORPHAN%2F98-clean-chroot;fp=etc%2Fgrml%2Ffai%2Fgrml%2Fgrml_cleanup_chroot.deborphan;h=a5515f0638684dfff8670bacd37cc50fa9ba6abb;hp=13e229175853be42eec4e2d72a7b0da61d5c8b11;hb=f3b335ea5c94d5cf24ec6b9184106b298849f311;hpb=9d16d7a6c9686f80a18e70bc8b5e67193dc0ffba diff --git a/etc/grml/fai/grml/grml_cleanup_chroot.deborphan b/etc/grml/fai/config/scripts/DEBORPHAN/98-clean-chroot similarity index 63% rename from etc/grml/fai/grml/grml_cleanup_chroot.deborphan rename to etc/grml/fai/config/scripts/DEBORPHAN/98-clean-chroot index 13e2291..a5515f0 100755 --- a/etc/grml/fai/grml/grml_cleanup_chroot.deborphan +++ b/etc/grml/fai/config/scripts/DEBORPHAN/98-clean-chroot @@ -1,17 +1,21 @@ #!/bin/bash -# Filename: /etc/grml/fai/grml/grml_cleanup_chroot.deborphan +# Filename: ${GRML_FAI_CONFIG}/config/scripts/DEBORPHAN/98-clean-chroot # Purpose: drop as many packages from grml as possible # Authors: (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. ################################################################################ +set -u +set -e + # remove all packages not necessary anymore: -apt-get -y --purge autoremove +$ROOTCMD apt-get -y --purge autoremove # remove packages until deborphan does not find anymore: -while [ "$(deborphan)" != "" ] ; do - apt-get -y --purge remove $(deborphan) +while [ "$($ROOTCMD deborphan)" != "" ] ; do + $ROOTCMD apt-get -y --purge remove $(deborphan) done ## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2