xref: /netbsd/etc/rc.d/mountcritlocal (revision bf9ec67e)
1#!/bin/sh
2#
3# $NetBSD: mountcritlocal,v 1.7 2002/04/29 12:29:53 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	#	Mount critical filesystems that are `local'
18	#	(as specified in $critical_filesystems_local)
19	#	This usually includes /var.
20	#
21	mount_critical_filesystems local
22
23	#	clean up left-over files.
24	#	this could include the cleanup of lock files and /var/run, etc.
25	#
26	rm -f /etc/nologin /var/spool/lock/LCK.* /var/spool/uucp/STST/*
27	(cd /var/run && rm -rf -- *)
28}
29
30load_rc_config $name
31run_rc_command "$1"
32