# 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:45 CEST 2007 [mika]
+# Latest change: Sun Nov 04 12:12:57 CET 2007 [mika]
################################################################################
# misc stuff
cp /etc/inittab.grml /etc/inittab
eend $?
+if [ "$(dpkg --list | awk '/^rc/ { print $2}')" != '' ] ; then
+ einfo "Purging removed packages"
+ dpkg --purge $(dpkg --list | awk '/^rc/ { print $2}')
+ eend $?
+fi
+
if [ -x /usr/bin/make -a -r /usr/src/Makefile ] ; then
einfo "Cleaning up /usr/src/linux-headers-$KERNEL"
- ( cd /usr/src && make clean && make symlinks )
+ ( cd /usr/src
+ VER=$(/bin/ls -d /usr/src/linux-headers-* | head -1)
+ VER=${VER##/usr/src/linux-headers-}
+ if [ -n "$VER" ] ; then
+ VER=$VER make clean && \
+ VER=$VER make symlinks
+ else
+ make clean && \
+ make symlinks
+ fi
+ )
eend $?
fi
if [ -d /usr/src/linux-headers-"$KERNEL" ] ; then
einfo "grml64 detected, assuming /usr/src/linux-headers-$KERNEL is ok." ; eend 0
else
- ewarn "/usr/src/linux-headers-$KERNEL not found, exiting." ; eend 0
+ ewarn "Warning: /usr/src/linux-headers-$KERNEL not found, exiting." ; eend 0
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
+ ewarn "Warning: /usr/include/linux is NOT a symlink to /usr/src/linux/include/linux/ (possible an error)"
+ ewarn "Common reason: you forgot to install linux-kernel-headers-grml and use linux-libc-dev instead"
+ eend 0
else
- ewarn "linux-headers-$KERNEL not installed." ; eend 0
+ ewarn "Warning: linux-headers-$KERNEL not installed." ; eend 0
fi
einfo "Creating ~/.zshrc"
/var/lib/games /var/cache/man \
/var/lib/nfs /var/lib/xkb \
/var/mail/grml /var/account/pacct
- mkdir -p /etc/sysconfig/network-scripts /etc/sysconfig/provider
# Recreate empty utmp and wtmp
:>/var/run/utmp
:>/var/run/wtmp
ewarn "clamav[-freshclam] not installed" ; eend 0
fi
+if [ -f /etc/default/snort.dpkg-dist -a -f /etc/default/snort ] ; then
+ einfo "Fixxing /etc/default/snort"
+ mv /etc/default/snort.dpkg-dist /etc/default/snort
+ eend $?
+fi
+
if ! [ -r /etc/ld.so.nohwcap ] ; then
einfo "Creating /etc/ld.so.nohwcap"
touch /etc/ld.so.nohwcap