diff options
Diffstat (limited to 'init/rcS-sulogin.conf')
-rw-r--r-- | init/rcS-sulogin.conf | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/init/rcS-sulogin.conf b/init/rcS-sulogin.conf new file mode 100644 index 00000000..d3aa20d1 --- /dev/null +++ b/init/rcS-sulogin.conf @@ -0,0 +1,22 @@ +# 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 + plymouth --hide-splash || true + exec /bin/bash +end script +post-stop script + if [ "$1" = "S" ]; then + runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab) + [ -z "$runlevel" ] && runlevel="3" + exec telinit $runlevel + fi +end script |