When cleaning /var/run make sure the control files are not removed
unconditionally when the script is being rerun (when it is called with the reload argument). PR: conf/47517 Approved by: markm (mentor)
This commit is contained in:
parent
edf6699ae6
commit
8484cf9776
@ -33,7 +33,11 @@ purgedir()
|
||||
fi
|
||||
}
|
||||
|
||||
rm -f /var/run/clean_var /var/spool/lock/clean_var
|
||||
# These files must be removed only the first time this script is run
|
||||
# on boot.
|
||||
#
|
||||
[ "$1" != "reload" ] && rm -f /var/run/clean_var /var/spool/lock/clean_var
|
||||
|
||||
if [ -d /var/run -a ! -f /var/run/clean_var ]; then
|
||||
purgedir /var/run
|
||||
# And an initial utmp file
|
||||
|
@ -72,7 +72,7 @@ mountcritremote_start()
|
||||
done
|
||||
|
||||
# Cleanup /var again just in case it's a network mount.
|
||||
/etc/rc.d/cleanvar start
|
||||
/etc/rc.d/cleanvar reload
|
||||
rm -f /var/run/clean_var /var/spool/lock/clean_var
|
||||
;;
|
||||
NetBSD)
|
||||
|
Loading…
Reference in New Issue
Block a user