2020-07-22 19:50:41 +03:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2020-09-08 15:52:18 +03:00
|
|
|
# $NetBSD: clearcritlocal,v 1.3 2020/09/08 12:52:18 martin Exp $
|
2020-07-22 19:50:41 +03:00
|
|
|
#
|
|
|
|
|
|
|
|
# REQUIRE: mountcritlocal
|
2020-09-08 15:52:18 +03:00
|
|
|
# BEFORE: CRITLOCALMOUNTED
|
2020-07-22 19:50:41 +03:00
|
|
|
|
|
|
|
$_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.*
|
2020-09-08 15:45:03 +03:00
|
|
|
if [ -d /var/run ]; then
|
|
|
|
cd /var/run && rm -rf -- *
|
|
|
|
fi
|
2020-07-22 19:50:41 +03:00
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|