Re: initdefault has no effect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux