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

Re: initdefault has no effect



| From: "Sharpe, Sam J" <sam sharpe+lists redhat gmail com>

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


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