X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=etc%2Fgrml%2Ffai%2Fgrml%2Fgrml_cleanup_chroot;h=71ad9eaeec8752cd16ac0a75b4e427ac2cc8646f;hp=9251d829d61c3553a784067bdab7cbff60c9076d;hb=1d1565d0e49;hpb=64ee1640d6806ce897546f710303f1d61e6d6b24 diff --git a/etc/grml/fai/grml/grml_cleanup_chroot b/etc/grml/fai/grml/grml_cleanup_chroot index 9251d82..71ad9ea 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 @@ -61,30 +61,24 @@ grep '^[a-z]' /etc/grml/modules >> /etc/modules eend 0 einfo "Setting up /etc/inittab" -if [ -z "$GRML_SMALL" ] ; then - cp /etc/inittab.grml /etc/inittab -else - cp /etc/inittab.small /etc/inittab -fi -eend 0 +cp /etc/inittab.grml /etc/inittab +eend $? -if [ -z "$GRML_SMALL" ] ; then - if [ -L /usr/include/linux ] ; then - einfo "/usr/include/linux is ok" ; eend 0 - elif [ -n "$GRML64" ] ; then - if [ -d /usr/src/linux-headers-"$KERNEL" ] ; then - einfo "grml64 detected, assuming /usr/src/linux-headers-$KERNEL is ok." ; eend 0 - else - eerror "/usr/src/linux-headers-$KERNEL not found, exiting." ; eend 1 - exit 10 - fi - elif [ -d /usr/src/linux-headers-"$KERNEL" ] ; then - eerror "/usr/include/linux is NOT a symlink to /usr/src/linux/include/linux/ - error" - eend 1 +if [ -L /usr/include/linux ] ; then + einfo "/usr/include/linux is ok" ; eend 0 +elif [ -n "$GRML64" ] ; then + if [ -d /usr/src/linux-headers-"$KERNEL" ] ; then + einfo "grml64 detected, assuming /usr/src/linux-headers-$KERNEL is ok." ; eend 0 + else + eerror "/usr/src/linux-headers-$KERNEL not found, exiting." ; eend 1 exit 10 - else - ewarn "linux-headers-$KERNEL not installed." ; eend 0 - fi + fi +elif [ -d /usr/src/linux-headers-"$KERNEL" ] ; then + eerror "/usr/include/linux is NOT a symlink to /usr/src/linux/include/linux/ - error" + eend 1 + exit 10 +else + ewarn "linux-headers-$KERNEL not installed." ; eend 0 fi einfo "Creating ~/.zshrc" @@ -158,11 +152,7 @@ else fi einfo "Copying original runlevel.conf to /etc/runlevel.conf" - if ! [ -z $GRML_SMALL ] ; then - cp /etc/runlevel.conf.livecd.small /etc/runlevel.conf - else - cp /etc/runlevel.conf.livecd /etc/runlevel.conf - fi +cp /etc/runlevel.conf.livecd /etc/runlevel.conf eend $? einfo "Removing x-server-conffiles" @@ -327,13 +317,6 @@ else fi 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/ @@ -375,6 +358,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/interfaces + 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