mountcritlocal revision 1.6
1#!/bin/sh 2# 3# $NetBSD: mountcritlocal,v 1.6 2002/03/27 08:53:42 lukem Exp $ 4# 5 6# PROVIDE: mountcritlocal 7# REQUIRE: root 8 9. /etc/rc.subr 10 11name="mountcritlocal" 12start_cmd="mountcritlocal_start" 13stop_cmd=":" 14 15mountcritlocal_start() 16{ 17 # If obsolete $critical_filesystems_beforenet is set, 18 # use that instead of $critical_filesystems_local. 19 # 20 if [ -n "$critical_filesystems_beforenet" -o \ 21 "${critical_filesystems_beforenet-unset}" != "unset" ]; then 22 warn 'Overriding $critical_filesystems_local with obsolete $critical_filesystems_beforenet' 23 critical_filesystems_local=$critical_filesystems_beforenet 24 fi 25 26 # Mount critical filesystems that are `local' 27 # (as specified in $critical_filesystems_local) 28 # This usually includes /var. 29 # 30 mount_critical_filesystems local 31 32 # clean up left-over files. 33 # this could include the cleanup of lock files and /var/run, etc. 34 # 35 rm -f /etc/nologin /var/spool/lock/LCK.* /var/spool/uucp/STST/* 36 (cd /var/run && rm -rf -- *) 37} 38 39load_rc_config $name 40run_rc_command "$1" 41