1 1.1 lukem #!/bin/sh 2 1.1 lukem # 3 1.14 wiz # $NetBSD: mountcritlocal,v 1.14 2014/07/22 17:11:09 wiz 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.3 lukem mount_critical_filesystems local 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.4 lukem (cd /var/run && rm -rf -- *) 28 1.11 haad # create LVM locking directory, it needs to be owned by operator 29 1.11 haad # group and has parmissions to allow lock file creation. 30 1.11 haad # 31 1.11 haad mkdir /var/run/lvm 32 1.13 haad chown root:operator /var/run/lvm 33 1.11 haad chmod 770 /var/run/lvm 34 1.3 lukem } 35 1.1 lukem 36 1.2 lukem load_rc_config $name 37 1.1 lukem run_rc_command "$1" 38