1 1.1 lukem #!/bin/sh 2 1.1 lukem # 3 1.15 kre # $NetBSD: mountcritlocal,v 1.15 2016/07/23 01:38:35 kre Exp $ 4 1.1 lukem # 5 1.1 lukem 6 1.1 lukem # PROVIDE: mountcritlocal 7 1.10 joerg # REQUIRE: fsck 8 1.1 lukem 9 1.8 mycroft $_rc_subr_loaded . /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.14 wiz # Mount critical file systems that are `local' 18 1.6 lukem # (as specified in $critical_filesystems_local) 19 1.5 lukem # This usually includes /var. 20 1.3 lukem # 21 1.15 kre mount_critical_filesystems local || return $? 22 1.3 lukem 23 1.3 lukem # clean up left-over files. 24 1.3 lukem # this could include the cleanup of lock files and /var/run, etc. 25 1.3 lukem # 26 1.9 christos rm -f /etc/nologin /var/spool/lock/LCK.* 27 1.15 kre test -d /var/run && (cd /var/run && rm -rf -- *) 28 1.15 kre 29 1.11 haad # create LVM locking directory, it needs to be owned by operator 30 1.11 haad # group and has parmissions to allow lock file creation. 31 1.11 haad # 32 1.15 kre mkdir -p /var/run/lvm 33 1.13 haad chown root:operator /var/run/lvm 34 1.11 haad chmod 770 /var/run/lvm 35 1.15 kre return 0 36 1.3 lukem } 37 1.1 lukem 38 1.2 lukem load_rc_config $name 39 1.1 lukem run_rc_command "$1" 40