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

start on runlevel S

stop on runlevel

console owner

script
	runlevel --set S >/dev/null || true
	/bin/bash

	runlevel=$(/bin/awk -F ':' '$3 == "initdefault" { print $2 }' /etc/inittab)
	[ -z "$runlevel" ] && runlevel="3"
	telinit $runlevel
end script