aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--event.d/rcS2
-rw-r--r--event.d/rcS-sulogin2
2 files changed, 2 insertions, 2 deletions
diff --git a/event.d/rcS b/event.d/rcS
index f040b1e6..728ae396 100644
--- a/event.d/rcS
+++ b/event.d/rcS
@@ -16,7 +16,7 @@ script
/etc/rc.d/rc.sysinit
runlevel --reboot || true
- runlevel=$(/bin/awk -F ':' '/^id:/ { print $2 }' /etc/inittab)
+ runlevel=$(/bin/awk -F ':' '$3 == "initdefault" { print $2 }' /etc/inittab)
[ -z "$runlevel" ] && runlevel="3"
for t in $(cat /proc/cmdline); do
case $t in
diff --git a/event.d/rcS-sulogin b/event.d/rcS-sulogin
index 5125fc41..1a2f49e2 100644
--- a/event.d/rcS-sulogin
+++ b/event.d/rcS-sulogin
@@ -12,7 +12,7 @@ script
runlevel --set S >/dev/null || true
/bin/bash
- runlevel=$(/bin/awk -F ':' '/^id:/ { print $2 }' /etc/inittab)
+ runlevel=$(/bin/awk -F ':' '$3 == "initdefault" { print $2 }' /etc/inittab)
[ -z "$runlevel" ] && runlevel="3"
telinit $runlevel
end script