summaryrefslogtreecommitdiff
path: root/rc.single
blob: d63073656c85360b9650080bb3413b1fc0a8fce1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
#
# /etc/rc.single: Single-user startup script.
#

. /etc/rc.conf
. /etc/rc.d/functions

export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

run_hook single_start

if [[ $PREVLEVEL != N ]]; then
	kill_everything single
	
	# start up our mini logger until syslog takes over
	minilogd
	
	# Start/trigger UDev, load MODULES and settle UDev
	udevd_modprobe single
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: