aboutsummaryrefslogtreecommitdiffstats
path: root/event.d/rcS-sulogin
blob: d74620dba39d85aafa9565b4790948c454f5e950 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# rcS-sulogin - "single-user" runlevel compatibility
#
# This task runs /bin/bash during "single-user" mode,
# then continues to the default runlevel.

start on runlevel S

stop on runlevel

console owner
script
	runlevel --set S >/dev/null || true
	/bin/bash || true
end script
post-stop script
	runlevel=$(/bin/awk -F ':' '$3 == "initdefault" { print $2 }' /etc/inittab)
	[ -z "$runlevel" ] && runlevel="3"
	exec telinit $runlevel
end script