[Pkg-sysvinit-devel] Bug#515595: /sbin/runinit confused over runlevel
pere at hungry.com
Fri Jul 24 14:52:40 UTC 2009
> I believe runlevel uses /var/run/*tmp, and guess its content is bogus.
> Any idea what could mess up the utmp/wtmp files?
It is calling setutent()/getutent() to find the runlevel information,
and this reads /var/run/utmp to get the current status. No idea what
could mess up utmp.
[Henrique de Moraes Holschuh]
> Can't we fix it to ask init? Resilience is good, and init is NEVER wrong
> about the runlevel...
I guess we could extend init/runlevel to track this information.
Would have to extend /dev/initctl protocol and make runlevel suid
root, I guess. Do init know about the previous runlevel? If not, it
would have to be extended to have this information.
Is it worth it to make runlevel suid root, to work around a strange
bug in something messing up /var/run/utmp?
More information about the Pkg-sysvinit-devel