Re: initdefault has no effect

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

 



| From: "Sharpe, Sam J" <sam.sharpe+lists.redhat@xxxxxxxxx>

| runlevel=$(/bin/awk -F ':' '($3 == "initdefault") && ($1 !~ /(#|;)/) { print $2 }' /etc/inittab)

Probably you meant ($1 !~ /^(#|;)/)

Simpler, I think:
  runlevel=`/bin/awk -F ':' '/^[^#;]/ && ($3 == "initdefault") { print $2 }' /etc/inittab`

-- 
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]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux