aboutsummaryrefslogtreecommitdiffstats
path: root/event.d/rcS-sulogin
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2008-04-25 14:16:31 -0400
committerBill Nottingham <notting@redhat.com>2008-04-25 14:16:31 -0400
commit951e577ef3b59b24f7366d08ce738980f327cf5d (patch)
tree7626ede10d04c07163b2a1b8f02df9af9567f6b1 /event.d/rcS-sulogin
parent6d68871c340d80954e1d474c9addc5cb4f30e968 (diff)
downloadinitscripts-951e577ef3b59b24f7366d08ce738980f327cf5d.tar
initscripts-951e577ef3b59b24f7366d08ce738980f327cf5d.tar.gz
initscripts-951e577ef3b59b24f7366d08ce738980f327cf5d.tar.bz2
initscripts-951e577ef3b59b24f7366d08ce738980f327cf5d.tar.xz
initscripts-951e577ef3b59b24f7366d08ce738980f327cf5d.zip
Import from event-compat-sysv-0.3.9-14.fc9
- Rework rc1, rcS, rcS-sulogin to use post-stop to avoid spurious 'rcS killed' messages (#444001) - Allow 's' for single-user mode (#443554)
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