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