initdefault has no effect
Sharpe, Sam J
sam.sharpe+lists.redhat at gmail.com
Tue Apr 7 12:47:49 UTC 2009
Mike Burger wrote:
> Tom Horsley wrote:
>> On Tue, 7 Apr 2009 06:42:36 -0400 (EDT)
>> Mike Burger wrote:
>>
>>
>>> I'm still doing some digging.
>>>
>>
>> I thought there was a thread on this very topic in a previous
>> release, but I can't find it (maybe it was in fedora-list
>> rather than fedora-test-list), anyway it is a very old bug
>> I'm surprised is still around.
>>
>> The script in the upstart code that searches /etc/inittab to
>> find the runlevel was not ignoring commented out lines, so
>> whatever line it found first, that's the one it grabbed the
>> runlevel from regardless of the comment prefix.
>>
>
> Bugger.
>
> This *is* the Fedora list, BTW, rather than the fedora-test list.
>
> However, I pop in and out of this list, given the level of traffic and
> my availability to monitor and try to answer questions (when I *think*
> that I'm actually capable of answering them), based on workload and
> travel, so it may be possible that I completely missed that thread,
> somewhere.
>
> Since I never really noticed this in F9...the only F9 systems I had were
> my laptop and workstation, so I didn't have much reason to
> customize)...I had no reason to investigate, either.
>
> If this is a filed bug, and you happen to have the bugzilla report ID,
> please forward. I'll also try to dig into it and see if I can find it,
> too...I'd like to see this one squashed...or, at the very least, verify
> which script it is and see if I can figure out the logic to fix it.
>
The script concerned is /etc/event.d/rcS (and /etc/event.d/rcS-sulogin -
both are owned by the initscripts RPM.
They do this:
runlevel=$(/bin/awk -F ':' '$3 == "initdefault" { print $2 }' /etc/inittab)
i.e. they don't ignore the line if $1 contains ; or #
They should probably do something more like:
runlevel=$(/bin/awk -F ':' '($3 == "initdefault") && ($1 !~ /(#|;)/) {
print $2 }' /etc/inittab)
I've assumed that # and ; are comments and aren't allowed in the
runlevel descriptions.
--
Sam
More information about the users
mailing list