[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.13, Thu Jan 13 22:30:09 2011 UTC (13 years, 3 months ago) by haad
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, khorben-n900, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2, agc-symver-base, agc-symver
Branch point for: tls-maxphys, tls-earlyentropy
Changes since 1.12: +2 -2 lines

Use chown now when it's available without /usr mounted.

#!/bin/sh
#
# $NetBSD: mountcritlocal,v 1.13 2011/01/13 22:30:09 haad 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 -- *)
	#       create LVM locking directory, it needs to be owned by operator
	#	group and has parmissions to allow lock file creation.
	#
	mkdir /var/run/lvm
	chown root:operator /var/run/lvm
	chmod 770 /var/run/lvm
}

load_rc_config $name
run_rc_command "$1"