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.
This commit is contained in:
lukem 2000-07-27 13:58:49 +00:00
parent eafc0ade2d
commit 392130e304
2 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/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 # PROVIDE: mountcritlocal
@ -23,9 +23,7 @@ mountcritlocal_start()
# this could include the cleanup of lock files and /var/run, etc. # this could include the cleanup of lock files and /var/run, etc.
# #
rm -f /etc/nologin /var/spool/lock/LCK.* /var/spool/uucp/STST/* rm -f /etc/nologin /var/spool/lock/LCK.* /var/spool/uucp/STST/*
(cd /var/run && { (cd /var/run && rm -rf -- *)
rm -rf -- *; install -c -m 664 -g utmp /dev/null utmp;
})
} }
load_rc_config $name load_rc_config $name

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/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 # PROVIDE: databases
@ -26,6 +26,12 @@ sysdb_start()
kvm_mkdb /netbsd kvm_mkdb /netbsd
fi fi
dev_mkdb 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 load_rc_config $name