Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/rc.d move recreating /var/run/utmp from mountcritlocal (...



details:   https://anonhg.NetBSD.org/src/rev/7b3a453ed322
branches:  trunk
changeset: 495395:7b3a453ed322
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jul 27 13:58:49 2000 +0000

description:
move recreating /var/run/utmp from mountcritlocal (where /var/run is
purged but /usr/bin/install is not available) to sysdb.
problem noted by Matthias Drochner.

diffstat:

 etc/rc.d/mountcritlocal |  6 ++----
 etc/rc.d/sysdb          |  8 +++++++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diffs (46 lines):

diff -r f003e2f96234 -r 7b3a453ed322 etc/rc.d/mountcritlocal
--- a/etc/rc.d/mountcritlocal   Thu Jul 27 13:57:23 2000 +0000
+++ b/etc/rc.d/mountcritlocal   Thu Jul 27 13:58:49 2000 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: mountcritlocal,v 1.3 2000/07/26 00:11:49 lukem Exp $
+# $NetBSD: mountcritlocal,v 1.4 2000/07/27 13:58:49 lukem Exp $
 #
 
 # PROVIDE: mountcritlocal
@@ -23,9 +23,7 @@
        #       this could include the cleanup of lock files and /var/run, etc.
        #
        rm -f /etc/nologin /var/spool/lock/LCK.* /var/spool/uucp/STST/*
-       (cd /var/run && {
-               rm -rf -- *; install -c -m 664 -g utmp /dev/null utmp;
-       })
+       (cd /var/run && rm -rf -- *)
 }
 
 load_rc_config $name
diff -r f003e2f96234 -r 7b3a453ed322 etc/rc.d/sysdb
--- a/etc/rc.d/sysdb    Thu Jul 27 13:57:23 2000 +0000
+++ b/etc/rc.d/sysdb    Thu Jul 27 13:58:49 2000 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: sysdb,v 1.3 2000/07/26 00:11:49 lukem Exp $
+# $NetBSD: sysdb,v 1.4 2000/07/27 13:58:49 lukem Exp $
 #
 
 # PROVIDE: databases
@@ -26,6 +26,12 @@
                kvm_mkdb /netbsd
        fi
        dev_mkdb
+
+       #       Re-create /var/run/utmp, which is deleted by mountcritlocal
+       #       but can't be recreated by it because install and chown may
+       #       not be available then (possibly no /usr).
+       #
+       install -c -m 664 -g utmp /dev/null /var/run/utmp
 }
 
 load_rc_config $name



Home | Main Index | Thread Index | Old Index