Re: initdefault has no effect

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

 



2009/4/7 D. Hugh Redelmeier <hugh@xxxxxxxxxx>:
> | From: "Sharpe, Sam J" <sam.sharpe+lists.redhat@xxxxxxxxx>
>
> | 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

-- 
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