summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/cleanvar
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.d/cleanvar')
-rw-r--r--etc/rc.d/cleanvar6
1 files changed, 5 insertions, 1 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
OpenPOWER on IntegriCloud