1 #!/bin/sh 2 # 3 # $NetBSD: clearcritlocal,v 1.1 2020/07/22 16:50:41 martin Exp $ 4 # 5 6 # REQUIRE: mountcritlocal 7 # BEFORE: MOUNTCRITLOCAL 8 9 $_rc_subr_loaded . /etc/rc.subr 10 11 name="clearcritlocal" 12 start_cmd="clearcritlocal_start" 13 stop_cmd=":" 14 15 clearcritlocal_start() 16 { 17 # clean up left-over files. 18 # this could include the cleanup of lock files and /var/run, etc. 19 # 20 rm -f /etc/nologin /var/spool/lock/LCK.* 21 test -d /var/run && (cd /var/run && rm -rf -- *) 22 return 0 23 } 24 25 load_rc_config $name 26 run_rc_command "$1" 27