[BACK]Return to mountcritlocal CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc / rc.d

File: [cvs.NetBSD.org] / src / etc / rc.d / mountcritlocal (download)

Revision 1.10, Tue Apr 21 16:08:57 2009 UTC (14 years, 11 months ago) by joerg
Branch: MAIN
CVS Tags: matt-premerge-20091211, matt-mips64-premerge-20101231, jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.9: +2 -2 lines

Split fsck during boot into two phases. Check the root file system
first, mount root and run the various disk providers. Add swap and
check the remaining file systems after that.
This breaks the dependency cycle for lvm, which needs writeable /dev.
Depend on rndctl in cgd.

#!/bin/sh
#
# $NetBSD: mountcritlocal,v 1.10 2009/04/21 16:08:57 joerg Exp $
#

# PROVIDE: mountcritlocal
# REQUIRE: fsck

$_rc_subr_loaded . /etc/rc.subr

name="mountcritlocal"
start_cmd="mountcritlocal_start"
stop_cmd=":"

mountcritlocal_start()
{
	#	Mount critical filesystems that are `local'
	#	(as specified in $critical_filesystems_local)
	#	This usually includes /var.
	#
	mount_critical_filesystems local

	#	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.*
	(cd /var/run && rm -rf -- *)
}

load_rc_config $name
run_rc_command "$1"