find /var/run -name \*.pid -exec rm {} \;
eend $?
-einfo "Unmounting proc, /dev/pts, /dev/capi"
- umount /proc 2>/dev/null
- umount /dev/pts 2>/dev/null
- umount /dev/capi 2>/dev/null
- umount -a 2>/dev/null
-eend $?
-
einfo "Removing /var/lib/apt/lists/*-stuff, dpkg-status-old and pkgcache.bin"
rm -f /var/lib/apt/lists/*Packages
rm -f /var/lib/apt/lists/*Release
# get rid of large kernel modules:
if ifclass GRML_SMALL ; then
+ einfo "Identified grml-small, removing some very large kernel drivers:"
if [ -r "/lib/modules/${KERNEL}/kernel/fs/ocfs2/ocfs2.ko" ] ; then
einfo "Removing /lib/modules/${KERNEL}/kernel/fs/ocfs2/ocfs2.ko"
rm -f "/lib/modules/${KERNEL}/kernel/fs/ocfs2/ocfs2.ko"
eend $?
fi
- if [ -r "/lib/modules/${KERNEL}/kernel/drivers/isdn/hisax/hisax.ko" ] ; then
- einfo "Removing /lib/modules/${KERNEL}/kernel/drivers/isdn/hisax/hisax.ko"
- rm -f "/lib/modules/${KERNEL}/kernel/drivers/isdn/hisax/hisax.ko"
+ if [ -d "/lib/modules/${KERNEL}/kernel/drivers/isdn/hisax/" ] ; then
+ einfo "Removing /lib/modules/${KERNEL}/kernel/drivers/isdn/hisax"
+ rm -rf "/lib/modules/${KERNEL}/kernel/drivers/isdn/hisax"
eend $?
fi
fi
ewarn "Warning: /usr/bin/grep-dctrl not available."
fi
-einfo "Copying original runlevel.conf to /etc/runlevel.conf"
-cp /etc/runlevel.conf.livecd /etc/runlevel.conf
-eend $?
-
einfo "Removing x-server-conffiles"
rm -f /etc/X11/xorg.conf /etc/X11/XF86Config-4 \
/etc/X11/XF86Config /etc/XF86Config /etc/XF86Config-4
/var/state/*/* /var/state/* /var/log/nessus/* \
/halt /reboot /ash.static /etc/dhcpc/*.info /etc/dhcpc/resolv* \
/etc/*passwd- /etc/*shadow- /etc/*group- /var/spool/postfix/maildrop/* \
- /etc/lvm/.cache /etc/lvm/cache/.cache /etc/lvm/backup/main 2>/dev/null
+ /etc/*.old /etc/*.pre_fcopy /etc/*.original /etc/lvm/.cache \
+ /etc/lvm/cache/.cache /etc/lvm/backup/main 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.* /core* 2>/dev/null
if [ -x /usr/bin/updatedb ] ; then
einfo "Updating locate-database"
- mount -t proc none /proc
updatedb --prunepaths='/tmp /usr/tmp /var/tmp /grml /root /proc /sys'
- umount /proc
eend $?
else
ewarn "updatedb not installed" ; eend 0
fi
-einfo "Unmounting all filesystems"
- umount -a
-eend $?
-
################################################################################
# MISC STUFF
# ~~~~~~~~~~
# file /usr/sbin/* | grep -v ', stripped' | grep -v 'perl' | grep -v 'Bourne' | grep -v 'python' | grep -v 'symbolic link'
#
# Is software by grml-repos up2date?
-# grep-dctrl --field Maintainer 'Michael Prokop' /var/lib/apt/lists/grml.org_repos_._* | grep Package | awk '{print $2}' | xargs echo
-#
-# runlevel.conf:
-# for file in /etc/init.d/* ; do grep $file -q /etc/runlevel.conf.hdinstall || echo $file not found ; done
+# grep-dctrl --field Maintainer 'Michael Prokop' /var/lib/apt/lists/* | grep Package | awk '{print $2}' | xargs echo
################################################################################
## END OF FILE #################################################################