[*] First commit
This commit is contained in:
41
scripts/rc.single
Executable file
41
scripts/rc.single
Executable file
@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# /etc/rc.single: Single-user start-up script.
|
||||
#
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
|
||||
run_hook single_start
|
||||
|
||||
if [[ $PREVLEVEL != N ]]; then
|
||||
|
||||
stop_all_daemons
|
||||
|
||||
run_hook single_prekillall
|
||||
|
||||
kill_all
|
||||
|
||||
run_hook single_postkillall
|
||||
|
||||
# Start/trigger udev, load MODULES, and settle udev
|
||||
udevd_modprobe single
|
||||
|
||||
# Removing leftover files
|
||||
remove_leftover
|
||||
fi
|
||||
|
||||
run_hook single_end
|
||||
|
||||
bootlogd_stop
|
||||
|
||||
if [[ $RUNLEVEL = 1 ]]; then
|
||||
printsep
|
||||
printhl "Entering single-user mode..."
|
||||
# make sure /dev/initctl is in place
|
||||
kill -HUP 1
|
||||
exec init -t1 S
|
||||
fi
|
||||
|
||||
# End of file
|
||||
# vim: set ts=2 sw=2 noet:
|
Reference in New Issue
Block a user