diff options
author | Petr Lautrbach <plautrba@redhat.com> | 2010-05-10 13:39:30 +0200 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2010-05-13 13:00:14 -0400 |
commit | ad03e23c39f9fa7b205dfe202d50d38c888393f4 (patch) | |
tree | 295775a437449f639f572f33bd7e002e0f24fc79 | |
parent | 5b4fa92a71a055172edeb0eacb3aa7462722eac4 (diff) | |
download | initscripts-ad03e23c39f9fa7b205dfe202d50d38c888393f4.tar initscripts-ad03e23c39f9fa7b205dfe202d50d38c888393f4.tar.gz initscripts-ad03e23c39f9fa7b205dfe202d50d38c888393f4.tar.bz2 initscripts-ad03e23c39f9fa7b205dfe202d50d38c888393f4.tar.xz initscripts-ad03e23c39f9fa7b205dfe202d50d38c888393f4.zip |
rcS*.conf - check if /etc/inittab exists (#590703)
-rw-r--r-- | init/rcS-sulogin.conf | 2 | ||||
-rw-r--r-- | init/rcS.conf | 2 |
2 files changed, 2 insertions, 2 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 diff --git a/init/rcS.conf b/init/rcS.conf index 51d52312..6f2e7d17 100644 --- a/init/rcS.conf +++ b/init/rcS.conf @@ -15,7 +15,7 @@ console output exec /etc/rc.d/rc.sysinit post-stop script if [ "$UPSTART_EVENTS" = "startup" ]; 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" for t in $(cat /proc/cmdline); do case $t in |