aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--event.d/prefdm6
-rw-r--r--event.d/rcS11
-rw-r--r--event.d/rcS-sulogin13
3 files changed, 11 insertions, 19 deletions
diff --git a/event.d/prefdm b/event.d/prefdm
index e53d18d8..7098bd76 100644
--- a/event.d/prefdm
+++ b/event.d/prefdm
@@ -7,6 +7,6 @@ start on stopped rc5
stop on runlevel [!5]
console output
-script
- exec /etc/X11/prefdm -nodaemon
-end script
+respawn
+respawn limit 10 120
+exec /etc/X11/prefdm -nodaemon
diff --git a/event.d/rcS b/event.d/rcS
index b361de1c..f040b1e6 100644
--- a/event.d/rcS
+++ b/event.d/rcS
@@ -15,15 +15,14 @@ script
/etc/rc.d/rc.sysinit
runlevel --reboot || true
- . /etc/sysconfig/init
- RL="3"
- [ "$GRAPHICAL" = "yes" ] && RL="5"
+ runlevel=$(/bin/awk -F ':' '/^id:/ { print $2 }' /etc/inittab)
+ [ -z "$runlevel" ] && runlevel="3"
for t in $(cat /proc/cmdline); do
case $t in
- -s|single|S) RL="S" ;;
- [1-9]) RL="$t" ;;
+ -s|single|S) runlevel="S" ;;
+ [1-9]) runlevel="$t" ;;
esac
done
- telinit $RL
+ telinit $runlevel
end script
diff --git a/event.d/rcS-sulogin b/event.d/rcS-sulogin
index ba5eea2e..5125fc41 100644
--- a/event.d/rcS-sulogin
+++ b/event.d/rcS-sulogin
@@ -12,14 +12,7 @@ script
runlevel --set S >/dev/null || true
/bin/bash
- if [ -r /etc/inittab ]; then
- RL="$(sed -n -e "/^id:[0-9]*:initdefault:/{s/^id://;s/:.*//;p}" /etc/inittab || true)"
- if [ -n "$RL" ]; then
- telinit $RL
- else
- telinit 2
- fi
- else
- telinit 2
- fi
+ runlevel=$(/bin/awk -F ':' '/^id:/ { print $2 }' /etc/inittab)
+ [ -z "$runlevel" ] && runlevel="3"
+ telinit $runlevel
end script