aboutsummaryrefslogtreecommitdiffstats
path: root/init/rcS-sulogin.conf
blob: 818518de10ec30d7ced61ef52c0ba469005c3208 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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 [!S]

console owner
script
	. /etc/sysconfig/init
	plymouth --hide-splash || true
	[ -z "$SINGLE" ] && SINGLE=/sbin/sushell
	exec $SINGLE
end script
post-stop script
	if [ "$RUNLEVEL" = "S" ]; then
		[ -f /etc/inittab ] && runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab)
		[ -z "$runlevel" ] && runlevel="3"
		exec telinit $runlevel
	fi
end script