projects
/
grml-live-grml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Another resolv.conf update
[grml-live-grml.git]
/
etc
/
grml
/
fai
/
grml
/
grml_cleanup_chroot
diff --git
a/etc/grml/fai/grml/grml_cleanup_chroot
b/etc/grml/fai/grml/grml_cleanup_chroot
index
be7bc6b
..
4b6df6d
100755
(executable)
--- a/
etc/grml/fai/grml/grml_cleanup_chroot
+++ b/
etc/grml/fai/grml/grml_cleanup_chroot
@@
-4,7
+4,7
@@
# Authors: (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
# 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 CES
T 2007 [mika]
+# Latest change:
Sun Nov 04 12:12:57 CE
T 2007 [mika]
################################################################################
# misc stuff
################################################################################
# misc stuff
@@
-52,9
+52,25
@@
einfo "Setting up /etc/inittab"
cp /etc/inittab.grml /etc/inittab
eend $?
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"
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
eend $?
fi
@@
-64,15
+80,14
@@
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
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
+ ewarn "Warning: /usr/src/linux-headers-$KERNEL not found, exiting." ; eend 0
fi
elif [ -d /usr/src/linux-headers-"$KERNEL" ] ; then
fi
elif [ -d /usr/src/linux-headers-"$KERNEL" ] ; then
- e
error "/usr/include/linux is NOT a symlink to /usr/src/linux/include/linux/ - error
"
- e
end 1
- e
xit 1
0
+ e
warn "Warning: /usr/include/linux is NOT a symlink to /usr/src/linux/include/linux/ (possible an error)
"
+ e
warn "Common reason: you forgot to install linux-kernel-headers-grml and use linux-libc-dev instead"
+ e
end
0
else
else
- ewarn "linux-headers-$KERNEL not installed." ; eend 0
+ ewarn "
Warning:
linux-headers-$KERNEL not installed." ; eend 0
fi
einfo "Creating ~/.zshrc"
fi
einfo "Creating ~/.zshrc"
@@
-227,7
+242,6
@@
einfo "Cleaning and removing some misc files and directories"
/var/lib/games /var/cache/man \
/var/lib/nfs /var/lib/xkb \
/var/mail/grml /var/account/pacct
/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
# Recreate empty utmp and wtmp
:>/var/run/utmp
:>/var/run/wtmp