X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fgrml%2Fgrml_cleanup_chroot;h=73b2ae6965af57582c9c87e5ebd5bca95c5dd819;hb=8f2c82bad21f1a2942b5164b1a6080b286ad3e01;hp=9b1cb2abeb026923c35a025280aa17381488fd37;hpb=7280b17f3796971162b0da54e0a5d5d43878f394;p=grml-live.git diff --git a/etc/grml/fai/grml/grml_cleanup_chroot b/etc/grml/fai/grml/grml_cleanup_chroot index 9b1cb2a..73b2ae6 100755 --- a/etc/grml/fai/grml/grml_cleanup_chroot +++ b/etc/grml/fai/grml/grml_cleanup_chroot @@ -4,7 +4,7 @@ # Authors: (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Mon Sep 17 16:57:17 CEST 2007 [mika] +# Latest change: Mon Sep 17 22:14:33 CEST 2007 [mika] ################################################################################ # misc stuff @@ -64,6 +64,10 @@ einfo "Setting up /etc/inittab" cp /etc/inittab.grml /etc/inittab eend $? +einfo "Cleaning up /usr/src/linux-headers-$KERNEL" +( cd /usr/src && make clean && make symlinks ) +eend $? + if [ -L /usr/include/linux ] ; then einfo "/usr/include/linux is ok" ; eend 0 elif [ -n "$GRML64" ] ; then @@ -257,7 +261,7 @@ einfo "Cleaning and removing some misc files and directories" /etc/lvm/.cache 2>/dev/null rm -rf /tmp/* /var/tmp/* /var/tmp/.* /var/backups/* /.ssh /root/.ssh /home/*/.ssh \ /home/grml/* /home/grml/.??* /var/lib/texmf/ls-R /var/spool/texmf/ls-R \ - /var/lib/mysql /var/log/lilo_log.* 2>/dev/null + /var/lib/mysql /var/log/lilo_log.* /core* 2>/dev/null nuke /var/log /var/cache zero /var/local /var/log /var/spool \ /var/lib/games /var/cache/man \ @@ -358,6 +362,20 @@ if ! [ -r /etc/ld.so.nohwcap ] ; then touch /etc/ld.so.nohwcap fi +# installation of resolvconf in chroot *with* /proc +# is different from an installation without /proc, +# so make sure it is OK in any case; don't use /dev/shm +if [ -d /etc/resolvconf ] ; then + rm -rf /etc/resolvconf/run + mkdir /etc/resolvconf/run + touch /etc/resolvconf/run/enable-updates + mkdir /etc/resolvconf/run/interface + cat > /etc/resolvconf/run/resolv.conf << EOF +# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) +# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN +EOF +fi + if [ -x /usr/bin/updatedb ] ; then einfo "Updating locate-database" mount -t proc none /proc