Module Name: src
Committed By: martin
Date: Tue Sep 8 12:45:03 UTC 2020
Modified Files:
src/etc/rc.d: clearcritlocal
Log Message:
Make it work with empty /var
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/clearcritlocal
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/etc/rc.d/clearcritlocal
diff -u src/etc/rc.d/clearcritlocal:1.1 src/etc/rc.d/clearcritlocal:1.2
--- src/etc/rc.d/clearcritlocal:1.1 Wed Jul 22 16:50:41 2020
+++ src/etc/rc.d/clearcritlocal Tue Sep 8 12:45:03 2020
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: clearcritlocal,v 1.1 2020/07/22 16:50:41 martin Exp $
+# $NetBSD: clearcritlocal,v 1.2 2020/09/08 12:45:03 martin Exp $
#
# REQUIRE: mountcritlocal
@@ -18,7 +18,9 @@ clearcritlocal_start()
# this could include the cleanup of lock files and /var/run, etc.
#
rm -f /etc/nologin /var/spool/lock/LCK.*
- test -d /var/run && (cd /var/run && rm -rf -- *)
+ if [ -d /var/run ]; then
+ cd /var/run && rm -rf -- *
+ fi
return 0
}