NetBSD/etc/rc.d/systemfs
lukem 5c1b0ec207 Use load_rc_config() (from rc.subr) instead of sourcing /etc/rc.conf.
This allows us or a user to change the configuration file method in
one place - rc.subr - without having to edit all of the rc.d/* files.
2000-05-13 08:45:06 +00:00

28 lines
509 B
Bash

#!/bin/sh
#
# $NetBSD: systemfs,v 1.2 2000/05/13 08:45:09 lukem Exp $
#
# PROVIDE: systemfs
# REQUIRE: network mountcritremote
. /etc/rc.subr
name="systemfs"
start_cmd="systemfs_start"
stop_cmd=":"
systemfs_start()
{
# clean up left-over files.
# 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;
})
}
load_rc_config $name
run_rc_command "$1"