aboutsummaryrefslogtreecommitdiffstats
path: root/event.d/rcS-sulogin
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2008-04-25 14:15:03 -0400
committerBill Nottingham <notting@redhat.com>2008-04-25 14:15:03 -0400
commit5ec2aa3a9080117be7705c6dc35f94f6099f3f10 (patch)
tree9f9c957f593dd86b8900ff2fdb8f4539579bd776 /event.d/rcS-sulogin
parent1de0b38f2b65479c6a5a4bf67b67d995cd7c7a89 (diff)
downloadinitscripts-5ec2aa3a9080117be7705c6dc35f94f6099f3f10.tar
initscripts-5ec2aa3a9080117be7705c6dc35f94f6099f3f10.tar.gz
initscripts-5ec2aa3a9080117be7705c6dc35f94f6099f3f10.tar.bz2
initscripts-5ec2aa3a9080117be7705c6dc35f94f6099f3f10.tar.xz
initscripts-5ec2aa3a9080117be7705c6dc35f94f6099f3f10.zip
Import from event-compat-sysv-0.3.9-12.fc9
- Go back to using /etc/inittab for default runlevel (reverts #432384) - Add respawn (and a limit) to prefdm (#440061)
Diffstat (limited to 'event.d/rcS-sulogin')
-rw-r--r--event.d/rcS-sulogin13
1 files changed, 3 insertions, 10 deletions
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