NetBSD/etc/rc.d/clearcritlocal

29 lines
515 B
Plaintext
Raw Normal View History

#!/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.*
2020-09-08 15:45:03 +03:00
if [ -d /var/run ]; then
cd /var/run && rm -rf -- *
fi
return 0
}
load_rc_config $name
run_rc_command "$1"