aboutsummaryrefslogtreecommitdiffstats
path: root/init/rcS-sulogin.conf
diff options
context:
space:
mode:
authorPetr Lautrbach <plautrba@redhat.com>2010-05-10 13:39:30 +0200
committerBill Nottingham <notting@redhat.com>2010-05-13 12:59:03 -0400
commit0b8393964ed79dbf7382266b7cb62e7d530bb2c5 (patch)
treeaad06ea3796bc4a55cb790779f8a2665bf307139 /init/rcS-sulogin.conf
parent40f6bf883eb73a7b12a45ca063c1b765ee063275 (diff)
downloadinitscripts-0b8393964ed79dbf7382266b7cb62e7d530bb2c5.tar
initscripts-0b8393964ed79dbf7382266b7cb62e7d530bb2c5.tar.gz
initscripts-0b8393964ed79dbf7382266b7cb62e7d530bb2c5.tar.bz2
initscripts-0b8393964ed79dbf7382266b7cb62e7d530bb2c5.tar.xz
initscripts-0b8393964ed79dbf7382266b7cb62e7d530bb2c5.zip
rcS*.conf - check if /etc/inittab exists (#590703)
Diffstat (limited to 'init/rcS-sulogin.conf')
-rw-r--r--init/rcS-sulogin.conf2
1 files changed, 1 insertions, 1 deletions
diff --git a/init/rcS-sulogin.conf b/init/rcS-sulogin.conf
index 4f1f1f13..9ce92ffa 100644
--- a/init/rcS-sulogin.conf
+++ b/init/rcS-sulogin.conf
@@ -14,7 +14,7 @@ script
end script
post-stop script
if [ "$RUNLEVEL" = "S" ]; then
- runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab)
+ [ -f /etc/inittab ] && runlevel=$(/bin/awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab)
[ -z "$runlevel" ] && runlevel="3"
exec telinit $runlevel
fi