Notice: the grml team is migrating from Mercurial to Git.
Please visit git.grml.org instead!
| author | Michael Prokop |
| Wed Sep 19 13:44:10 2007 +0200 (14 months ago) | |
| changeset 91 | fcc52be457e9 |
| manifest | fcc52be457e9 |
| parent 90 | 53d9a17dadb2 |
| child 92 | 0f8bc47aba32 |
--- a/docs/grml-live.txt Wed Sep 19 13:12:46 2007 +0200+++ b/docs/grml-live.txt Wed Sep 19 13:44:10 2007 +0200@@ -387,7 +387,8 @@ error processing" [software.log], "FAILE* support something like a directory /etc/grml/fai/packages to installadditional Debian packages without the need for a Debian repository-* document the available classes in more detail+* document the available classes in more detail (GRMLBASE, LATEX_CLEANUP,+NO_ONLINE, REMOVE_DOCS, GRML_SMALL,...)* add a check to make sure $TARGET is mounted rw,suid,dev?
--- a/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot Wed Sep 19 13:12:46 2007 +0200+++ b/etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot Wed Sep 19 13:44:10 2007 +0200@@ -4,36 +4,43 @@# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org># Bug-Reports: see http://grml.org/bugs/# License: This file is licensed under the GPL v2 or any later version.-# Latest change: Mon Sep 17 17:36:13 CEST 2007 [mika]+# Latest change: Wed Sep 19 13:42:19 CEST 2007 [mika]################################################################################+set -eset -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-*)-# NOONLINE: disable functions that require working network setup-# 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+# remove some big directories when using class LATEX_CLEANUP:+if ifclass LATEX_CLEANUP ; then+ cp /etc/grml/fai/grml/grml_cleanup_chroot.latex_cleanup $target/root/+ $ROOTCMD /root/grml_cleanup_chroot.latex_cleanup+ rm $target/root/grml_cleanup_chroot.latex_cleanupfi-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+# skip tasks which require only when using class NO_ONLINE:+if ! ifclass NO_ONLINE ; then+ cp /etc/grml/fai/grml/grml_cleanup_chroot.no_online $target/root/+ $ROOTCMD /root/grml_cleanup_chroot.no_online+ rm $target/root/grml_cleanup_chroot.no_onlinefi-# final cleanup+# remove /usr/share/doc, /usr/share/info,... only in class REMOVE_DOCS:+if ifclass REMOVE_DOCS: ; then+ cp /etc/grml/fai/grml/grml_cleanup_chroot.remove_docs $target/root/+ $ROOTCMD /root/grml_cleanup_chroot.remove_docs+ rm $target/root/grml_cleanup_chroot.remove_docs+fi++# misc cleanup:cp /etc/grml/fai/grml/grml_cleanup_chroot $target/root/-$ROOTCMD sh -c "NOCOLORS=1 /root/grml_cleanup_chroot"+$ROOTCMD /root/grml_cleanup_chrootrm $target/root/grml_cleanup_chroot++# make sure GRML_SMALL uses the appropriate configuration:+if ifclass GRML_SMALL ; then+ cp $target/etc/inittab.small $target/etc/inittab+ cp $target/etc/runlevel.conf.livecd.small $target/etc/runlevel.conf+fi## END OF FILE ################################################################## vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=3
--- a/etc/grml/fai/grml/grml_cleanup_chroot Wed Sep 19 13:12:46 2007 +0200+++ b/etc/grml/fai/grml/grml_cleanup_chroot Wed Sep 19 13:44:10 2007 +0200@@ -4,28 +4,16 @@# Authors: (c) Michael Prokop <mika@grml.org># Bug-Reports: see http://grml.org/bugs/# License: This file is licensed under the GPL v2.-# Latest change: Mon Sep 17 22:14:33 CEST 2007 [mika]+# Latest change: Wed Sep 19 13:38:45 CEST 2007 [mika]################################################################################# misc stuffumask 022- [ -n "$NOCOLORS" ] || . /etc/grml_colors. /etc/grml/lsb-functions || exit 6[ -x /lib64 ] && GRML64=yes || GRML64=''# detect kernel version, assume newest kernel versionKERNEL=$(ls -1 /lib/modules/ | sort -r -u | head -1)--if [ -n "$LATEX_CLEANUP" ] ; then- rm -rf /usr/share/doc/texlive-latex-recommended/latex/ \- /usr/share/doc/texlive-latex-base/latex/ \- /usr/share/doc/texlive-base-bin/pdftex/thanh/ \- /usr/share/doc/texlive-latex-base/latex/base/ \- /usr/share/doc/texlive-latex-base/latex/hyperref/ \- /usr/share/doc/texlive-latex-base/generic/babel/ \- /usr/share/doc/texlive-latex-recommended/latex/koma-script/ \- /usr/share/doc/texmf/pgf/pgfmanual.pdf.gz-fiif [ -f /usr/share/fonts/X11/misc/artwiz-cursor.pcf.gz ] ; thenif dpkg-divert --list artwiz-cursor | grep -q /usr/share/fonts/X11/misc/cursor.pcf.gz ; then@@ -220,36 +208,6 @@ elseelseewarn "depmod not installed" ; eend 0fi--if [ -n "$NOONLINE" ] ; then- einfo "\$NOONLINE is set, skipping online tasks" ; eend 0-else--if [ -x /usr/bin/freshclam ] ; then- einfo "Updating clamav database via running freshclam"- /usr/bin/freshclam ; eend $?-else- ewarn "freshclam not installed" ; eend 0-fi--if [ -x /usr/bin/update-pciids ] ; then- einfo "Updating PCI- and USB-ids"- update-pciids- update-usbids- eend $?-else- ewarn "update-pciids/update-usbids not installed" ; eend 0-fi--if [ -x /usr/sbin/nessus-update-plugins ] ; then- einfo "Updating nessus-plugins"- nessus-update-plugins- eend $?-else- ewarn "nessus-update-plugins not installed" ; eend 0-fi--fi # end of $NOONLINE-checkeinfo "Cleaning and removing some misc files and directories"rm -f /etc/sysconfig/* /etc/motd.dpkg-new /etc/auto.master.distrib.dpkg-new \@@ -281,11 +239,6 @@ elseewarn "update-ca-certificates not installed" ; eend 0fi-# some stuff does not have to run every single time...-if [ -n "$FAST" ] ; then- einfo "\$FAST is set, skipping some tasks" ; eend 0-else-# regenerate module dependencies and ls.so.cacheif [ -x /sbin/ldconfig ] ; theneinfo "Updating ld.so.cache"@@ -318,30 +271,6 @@ if [ -x /usr/bin/mandb ] ; theneend $?elseewarn "mandb not installed" ; eend 0-fi--if [ -n "$REMOVE_DOCS" ] ; then- einfo "Cleaning documentation directories..."- if [ -d /usr/share/doc/grml-docs ] ; then- mv /usr/share/doc/grml-docs /tmp/- fi-- rm -rf /usr/share/doc- mkdir /usr/share/doc-- if [ -d /tmp/grml-docs ] ; then- mv /tmp/grml-docs /usr/share/doc/grml-docs- fi-- rm -rf /usr/share/gtk-doc/- rm -rf /usr/share/man/- rm -rf /usr/man- rm -rf /usr/share/info- eend $?-- einfo "Creating /usr/share/info/..."- mkdir -p /usr/share/info/- eend $?fiif [ -d /var/lib/clamav/ ] ; then@@ -386,8 +315,6 @@ elseewarn "updatedb not installed" ; eend 0fi-fi # end of $FAST-check-einfo "Unmounting all filesystems"umount -aeend $?
--- /dev/null Thu Jan 01 00:00:00 1970 +0000+++ b/etc/grml/fai/grml/grml_cleanup_chroot.latex_cleanup Wed Sep 19 13:44:10 2007 +0200@@ -0,0 +1,22 @@+#!/bin/bash+# Filename: /etc/grml/fai/grml/grml_cleanup_chroot_latex_cleanup+# Purpose: remove some large LaTeX directories+# Authors: (c) Michael Prokop <mika@grml.org>+# Bug-Reports: see http://grml.org/bugs/+# License: This file is licensed under the GPL v2.+# Latest change: Wed Sep 19 13:38:49 CEST 2007 [mika]+################################################################################++# misc stuff+ . /etc/grml/lsb-functions || exit 6++rm -rf /usr/share/doc/texlive-latex-recommended/latex/ \+ /usr/share/doc/texlive-latex-base/latex/ \+ /usr/share/doc/texlive-base-bin/pdftex/thanh/ \+ /usr/share/doc/texlive-latex-base/latex/base/ \+ /usr/share/doc/texlive-latex-base/latex/hyperref/ \+ /usr/share/doc/texlive-latex-base/generic/babel/ \+ /usr/share/doc/texlive-latex-recommended/latex/koma-script/ \+ /usr/share/doc/texmf/pgf/pgfmanual.pdf.gz++## END OF FILE #################################################################
--- /dev/null Thu Jan 01 00:00:00 1970 +0000+++ b/etc/grml/fai/grml/grml_cleanup_chroot.no_online Wed Sep 19 13:44:10 2007 +0200@@ -0,0 +1,38 @@+#!/bin/bash+# Filename: /etc/grml/fai/grml/grml_cleanup_chroot_no_online+# Purpose: execute tasks that require network access+# Authors: (c) Michael Prokop <mika@grml.org>+# Bug-Reports: see http://grml.org/bugs/+# License: This file is licensed under the GPL v2.+# Latest change: Wed Sep 19 13:38:54 CEST 2007 [mika]+################################################################################++# misc stuff+ umask 022+ . /etc/grml/lsb-functions || exit 6++if [ -x /usr/bin/freshclam ] ; then+ einfo "Updating clamav database via running freshclam"+ /usr/bin/freshclam ; eend $?+else+ ewarn "freshclam not installed" ; eend 0+fi++if [ -x /usr/bin/update-pciids ] ; then+ einfo "Updating PCI- and USB-ids"+ update-pciids+ update-usbids+ eend $?+else+ ewarn "update-pciids/update-usbids not installed" ; eend 0+fi++if [ -x /usr/sbin/nessus-update-plugins ] ; then+ einfo "Updating nessus-plugins"+ nessus-update-plugins+ eend $?+else+ ewarn "nessus-update-plugins not installed" ; eend 0+fi++## END OF FILE #################################################################
--- /dev/null Thu Jan 01 00:00:00 1970 +0000+++ b/etc/grml/fai/grml/grml_cleanup_chroot.remove_docs Wed Sep 19 13:44:10 2007 +0200@@ -0,0 +1,33 @@+#!/bin/bash+# Filename: /etc/grml/fai/grml/grml_cleanup_chroot_remove_docs+# Purpose: remove docs in grml chroot+# Authors: (c) Michael Prokop <mika@grml.org>+# License: This file is licensed under the GPL v2.+# Latest change: Wed Sep 19 13:38:58 CEST 2007 [mika]+################################################################################++. /etc/grml/lsb-functions || exit 6++einfo "Cleaning documentation directories..."+if [ -d /usr/share/doc/grml-docs ] ; then+ mv /usr/share/doc/grml-docs /tmp/+fi++rm -rf /usr/share/doc+mkdir /usr/share/doc++if [ -d /tmp/grml-docs ] ; then+ mv /tmp/grml-docs /usr/share/doc/grml-docs+fi++rm -rf /usr/share/gtk-doc/+rm -rf /usr/share/man/+rm -rf /usr/man+rm -rf /usr/share/info+eend $?++einfo "Creating /usr/share/info/..."+mkdir -p /usr/share/info/+eend $?++## END OF FILE #################################################################
--- a/etc/grml/fai/grml/grml_cleanup_chroot.small Wed Sep 19 13:12:46 2007 +0200+++ /dev/null Thu Jan 01 00:00:00 1970 +0000@@ -1,53 +0,0 @@-#!/bin/bash-# Filename: /etc/grml/fai/grml/grml_cleanup_chroot.small-# Purpose: clean up grml chroot (adjusted for grml-small)-# Authors: (c) Michael Prokop <mika@grml.org>-# License: This file is licensed under the GPL v2.-# Latest change: Mon Sep 17 17:34:47 CEST 2007 [mika]-################################################################################--# misc stuff- umask 022- [ -n "$NOCOLORS" ] || . /etc/grml_colors- . /etc/grml/lsb-functions || exit 6--einfo "Setting up /etc/inittab"-cp /etc/inittab.small /etc/inittab-eend $?--einfo "Copying original runlevel.conf to /etc/runlevel.conf"-cp /etc/runlevel.conf.livecd.small /etc/runlevel.conf-eend $?--if [ -n "$REMOVE_DOCS" ] ; then-# einfo "Cleaning up /etc/skel..."-# rm -rf /etc/skel/.fluxbox-# rm -rf /etc/skel/.gkrellm2-# rm -rf /etc/skel/.idesktop-# rm -rf /etc/skel/.pekwm-# eend $?-- einfo "Cleaning documentation directories..."- if [ -d /usr/share/doc/grml-docs ] ; then- mv /usr/share/doc/grml-docs /tmp/- fi-- rm -rf /usr/share/doc- mkdir /usr/share/doc-- if [ -d /tmp/grml-docs ] ; then- mv /tmp/grml-docs /usr/share/doc/grml-docs- fi-- rm -rf /usr/share/gtk-doc/- rm -rf /usr/share/man/- rm -rf /usr/man- rm -rf /usr/share/info- eend $?-- einfo "Creating /usr/share/info/..."- mkdir -p /usr/share/info/- eend $?-fi--## END OF FILE #################################################################