czyszczenie /var/run cz. 2

Olgierd Pieczul wojrus w linux.slupsk.net
Sob, 29 Cze 2002, 15:04:19 CEST


Ponieważ nie było (konstruktywnego) odzewu, przedstawiam co jeszcze
można zmienić w rc.sysinit a propos czyszczenia katalogów /var/run i
/var/lock.
-- 
Olgierd Pieczul
wojrus w linux.slupsk.net
"Rozumiem 'jak', nie rozumiem 'dlaczego'"
-------------- następna część ---------
--- rc-scripts.orig/rc.d/rc.sysinit	Mon Jun 24 09:08:01 2002
+++ rc-scripts/rc.d/rc.sysinit	Sat Jun 29 14:55:08 2002
@@ -596,7 +596,7 @@
 for afile in /var/lock/* /var/run/*; do
 	if [ -d "$afile" ]; then
 		bafile=$(basename $afile)
-		[ "$bafile" != "news" -a "$bafile" != "sudo" -a "$bafile" != "mon" ] && rm -f $afile/*
+		[ "$bafile" != "news" -a "$bafile" != "sudo" -a "$bafile" != "mon" ] && rm -rf $afile/*
 	else
 		rm -f $afile 2> /dev/null
 	fi
@@ -605,14 +605,8 @@
 # Delete stale pid files
 rm -f /var/spool/postoffice/.pid.*
 
-# Delete subsys locks ad (possible) dhcpcd lock in case the machine crashed last time
-rm -f /var/lock/subsys/*
-rm -f /var/run/dhcpcd-*.pid file
-
-
 {
 # Clean up utmp/wtmp
-rm -f /var/run/utmp?
 if ! is_no "$NEED_XFILES" ; then
 	:>/var/run/utmpx
 	touch /var/log/wtmpx


Więcej informacji o liście dyskusyjnej pld-rc-scripts