util: runlevel should return "unknown" before telinit run
Bug #400248 reported by
Scott James Remnant (Canonical)
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart |
Fix Released
|
Low
|
Scott James Remnant (Canonical) |
Bug Description
I was thinking about this, we currently set RUNLEVEL and PREVLEVEL to "" when in rc-sysinit, which means that the "current runlevel" ends up being N.
runlevel will report
N N
telinit and shutdown will use PREVLEVEL=N in the new runlevel.
I don't think this is right, I think that there should be "no current runlevel"; we should search /var/run/utmp which will either not exist or be empty, and thus runlevel should report "unknown"
telinit and shutdown (which use sysv.c) already check for an error getting the runlevel and substitute N anyway.
Changed in upstart: | |
assignee: | nobody → Scott James Remnant (scott) |
milestone: | none → 0.6.1 |
To post a comment you must log in.
As the comment says, these env vars are there to override bad information in /var/run/utmp; so runlevel should check for 'N' and never print it