Commit Graph

2 Commits

Author SHA1 Message Date
Jesse Smith
6e8323e9fb The init process now writes the current runlevel to /var/run/runlevel.
This information can be read by the "runlevel" command as well as "halt"
and "reboot". Having the information logged in /var/run/runlevel as
well as the utmp file means systems without utmp (like those running
the musl C library) can still check the current runlevel. This is
useful when running halt/reboot as these programs want to check the
runlevel.

Updated the changelog, and manual pages for halt and runlevel.
2018-07-07 20:19:03 -03:00
Jesse Smith
6b26692584 Added new runlevel log code which saves (and reads) the current runlevel
from /var/run/runlevel. Added test code to runlevel.c to confirm it works.

Will use this to save/restore runlevel on systems where utmp is not
available.
2018-07-07 18:49:04 -03:00