sysvinit-devel
[Top][All Lists]
Advanced

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

[sysvinit-devel] Reading runlevel without utmp


From: Jesse Smith
Subject: [sysvinit-devel] Reading runlevel without utmp
Date: Sat, 7 Jul 2018 20:39:10 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

Today I pushed new code to the git "2.91" branch which makes init (and
its associated tools) write the current runlevel to a log file
(/var/run/runlevel). Having this information here, as well as in utmp,
lets us check/confirm the current runlevel on systems that do not
support utmp. This should come in handy on platforms like FreeBSD and
Linux distros that use the musl C library.

That's the theory anyway. :) I have tested it on my own machines by
booting and then deleting the /var/run/utmp file to confirm the halt,
reboot and runlevel tools could still properly detect the current runlevel.

So far the change is working for me and I'm no longer getting errors
from halt/reboot when utmp does not exist. I'd like to get feedback on
whether this change is working for others. I had to update our Makefile
a bit with the new code and want to make sure nothing got broken in the
process.

- Jesse



reply via email to

[Prev in Thread] Current Thread [Next in Thread]