aboutsummaryrefslogtreecommitdiffstats
path: root/event.d/rcS
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2008-11-24 15:07:46 -0500
committerBill Nottingham <notting@redhat.com>2008-11-24 15:07:46 -0500
commitfe48747faa0fe0f473f24d26e9a1059ef96cdb80 (patch)
treee1251cf02f52254dd438b73cd537573345928427 /event.d/rcS
parentc9ef1f45fae04b7342bcdcf5dc95d8ede97a7cff (diff)
downloadinitscripts-fe48747faa0fe0f473f24d26e9a1059ef96cdb80.tar
initscripts-fe48747faa0fe0f473f24d26e9a1059ef96cdb80.tar.gz
initscripts-fe48747faa0fe0f473f24d26e9a1059ef96cdb80.tar.bz2
initscripts-fe48747faa0fe0f473f24d26e9a1059ef96cdb80.tar.xz
initscripts-fe48747faa0fe0f473f24d26e9a1059ef96cdb80.zip
When looking for the default runlevel, don't match commented lines. (#472717)
Diffstat (limited to 'event.d/rcS')
-rw-r--r--event.d/rcS2
1 files changed, 1 insertions, 1 deletions
diff --git a/event.d/rcS b/event.d/rcS
index b01ddc57..e50e897f 100644
--- a/event.d/rcS
+++ b/event.d/rcS
@@ -18,7 +18,7 @@ script
end script
post-stop script
if [ "$UPSTART_EVENT" == "startup" ]; then
- runlevel=$(/bin/awk -F ':' '$3 == "initdefault" { print $2 }' /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