aboutsummaryrefslogtreecommitdiffstats
path: root/event.d/rcS-sulogin
diff options
context:
space:
mode:
Diffstat (limited to 'event.d/rcS-sulogin')
-rw-r--r--event.d/rcS-sulogin11
1 files changed, 6 insertions, 5 deletions
diff --git a/event.d/rcS-sulogin b/event.d/rcS-sulogin
index 1a2f49e2..d74620db 100644
--- a/event.d/rcS-sulogin
+++ b/event.d/rcS-sulogin
@@ -1,18 +1,19 @@
# rcS-sulogin - "single-user" runlevel compatibility
#
-# This task runs the sulogin binary during "single-user" mode.
+# 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
-
+ /bin/bash || true
+end script
+post-stop script
runlevel=$(/bin/awk -F ':' '$3 == "initdefault" { print $2 }' /etc/inittab)
[ -z "$runlevel" ] && runlevel="3"
- telinit $runlevel
+ exec telinit $runlevel
end script