On 06/13/2018 04:08 PM, Matias Fonzo wrote: > > That explain why it can't determine the runlevel. The file exists, > but it is a limitation of the libc, in our case (Dragora -devel), we > are using Musl. See > https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs?
This is interesting. We may have to look into a way for the shutdown process to get runlevels without using utmp. Perhaps init could write the runlevel directly to a file, such as /var/run/runlevel to work around situations like this. >> Alternatively, you can try using the "shutdown" command in place of >> "halt". Running "shutdown -P -h now" is approximately the equivalent >> of using "halt". > The command used was 'reboot'. > If I'm not mistaken, the reboot command is just a link to the halt binary. So I'd still like to find out if using shutdown will work where halt/reboot fail.