Comment 7 for bug 405847

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 405847] Re: conf: DEFAULT_RUNLEVEL should not be assigned if nothing found from /etc/inittab

On Sun, 2009-08-30 at 03:05 +0000, steven_shiau wrote:

> Thanks for the bug fixed. However, the code in the http://bazaar.launchpad.net/~scott/upstart/0.6/revision/1206 will _REPLACE_ the DEFAULT_RUNLEVEL even if /etc/inittab is something like:
> #id:3:initdefault:
> i.e. a commented line beginning with "#".
> Maybe it's better to make it like:
> eval "$(sed -nre 's/^[^#][^:]+:([0-6sS]):initdefault:.*/DEFAULT_RUNLEVEL="\1";/p' inittab || true)"
>
> I believe you have better way to write it.
> My 2 cents.
>
Could you open a new bug about that?

It probably needs to be

 ^[^#][^:]*:

Since I think 1-character ids are acceptable to sysvinit

Scott
--
Scott James Remnant
<email address hidden>