29 lines
515 B
Bash
Executable File
29 lines
515 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $NetBSD: clearcritlocal,v 1.3 2020/09/08 12:52:18 martin Exp $
|
|
#
|
|
|
|
# REQUIRE: mountcritlocal
|
|
# BEFORE: CRITLOCALMOUNTED
|
|
|
|
$_rc_subr_loaded . /etc/rc.subr
|
|
|
|
name="clearcritlocal"
|
|
start_cmd="clearcritlocal_start"
|
|
stop_cmd=":"
|
|
|
|
clearcritlocal_start()
|
|
{
|
|
# 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.*
|
|
if [ -d /var/run ]; then
|
|
cd /var/run && rm -rf -- *
|
|
fi
|
|
return 0
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|