# 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 16:57:17 CEST 2007 [mika]
+# Latest change: Mon Sep 17 22:14:33 CEST 2007 [mika]
################################################################################
# misc stuff
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
+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
+ 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"
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"
/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 \
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/
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