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:
Mike Makonnen 2003-02-15 06:00:11 +00:00
parent edf6699ae6
commit 8484cf9776
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=110907
2 changed files with 6 additions and 2 deletions

View File

@ -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

View 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)