X-Git-Url: https://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=etc%2Fgrml%2Ffai%2Fconfig%2Fscripts%2FGRMLBASE%2F98-clean-chroot;h=e66fcf78c0f86aa93ae3708f3f1dbff1994aa728;hb=f9e99174221e1035d0eec78ff68d0c65bdc3fba4;hp=02665f6b63d7ed9f847e591745204c971945ddec;hpb=8f2c82bad21f1a2942b5164b1a6080b286ad3e01;p=grml-live-grml.git diff --git a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot index 02665f6..e66fcf7 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot +++ b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot @@ -10,6 +10,8 @@ set -u set -e +# TODO: use extra files and class names instead of environment variabes + # supported environment variables for grml_cleanup_chroot: # NOCOLORS: if set it disables colors in (debugging) output # LATEX_CLEANUP: remove some big directories of texlive (/usr/share/doc/texlive-*) @@ -17,6 +19,18 @@ set -e # FAST: skip some longer tasks # REMOVE_DOCS: rm -rf /usr/share/doc + /usr/share/info +if ifclass GRML_SMALL ; then + cp /etc/grml/fai/grml/grml_cleanup_chroot.small $target/root/ + $ROOTCMD sh -c "NOCOLORS=1 /root/grml_cleanup_chroot.small" + rm $target/root/grml_cleanup_chroot.small +fi + +if ifclass REMOVE_DOCS ; then + $ROOTCMD sh -c "NOCOLORS=1 REMOVE_DOCS=1 /root/grml_cleanup_chroot.small" + rm $target/root/grml_cleanup_chroot.small +fi + +# final cleanup cp /etc/grml/fai/grml/grml_cleanup_chroot $target/root/ $ROOTCMD sh -c "NOCOLORS=1 /root/grml_cleanup_chroot" rm $target/root/grml_cleanup_chroot