summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-02-15 06:00:11 +0000
committermtm <mtm@FreeBSD.org>2003-02-15 06:00:11 +0000
commit4d9a4192f7eb015a646c0400dfb5aa7099a3a402 (patch)
tree4ac1d407b2eb69932a5cc3a04dc6f60bb2a27022 /etc
parentd9a7e5d6275ad9bb5fb49ed6879def1058777294 (diff)
downloadFreeBSD-src-4d9a4192f7eb015a646c0400dfb5aa7099a3a402.zip
FreeBSD-src-4d9a4192f7eb015a646c0400dfb5aa7099a3a402.tar.gz
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)
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.d/cleanvar6
-rwxr-xr-xetc/rc.d/mountcritremote2
2 files changed, 6 insertions, 2 deletions
diff --git a/etc/rc.d/cleanvar b/etc/rc.d/cleanvar
index e67b24e..6ad92a2 100644
--- a/etc/rc.d/cleanvar
+++ b/etc/rc.d/cleanvar
@@ -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
diff --git a/etc/rc.d/mountcritremote b/etc/rc.d/mountcritremote
index 1fbb389..0561317 100755
--- a/etc/rc.d/mountcritremote
+++ b/etc/rc.d/mountcritremote
@@ -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)
OpenPOWER on IntegriCloud