initdefault has no effect
Sharpe, Sam J
sam.sharpe+lists.redhat at gmail.com
Wed Apr 8 06:23:45 UTC 2009
2009/4/7 D. Hugh Redelmeier <hugh at mimosa.com>:
> | From: "Sharpe, Sam J" <sam.sharpe+lists.redhat at gmail.com>
>
> | runlevel=$(/bin/awk -F ':' '($3 == "initdefault") && ($1 !~ /(#|;)/) { print $2 }' /etc/inittab)
>
> Probably you meant ($1 !~ /^(#|;)/)
Actually I didn't - hence my comment:
> I've assumed that # and ; are comments and aren't allowed in the runlevel descriptions.
# is definitely a comment
; this might be a comment
# I consider a comment - # is the first non-whitespace character
Because It's only matching on $1 and split on colons, then the only
conceivable bad match would be something like:
id#:5:initdefault:
hence the assumption that # is not allowed in the runlevel descriptions.
--
Sam
More information about the fedora-list
mailing list