void-runit icon indicating copy to clipboard operation
void-runit copied to clipboard

Only try to run kexec on reboot

Open oynqr opened this issue 1 year ago • 0 comments

I have recently fooled around with kexec and found a small issue. Commits 05c6e86e085e0c0fdfc84a013477efd51e700845 and df580011835bff76fc0d4473f52344898abd9ef5 changed how /run/runit/reboot works, which results in if [ -e /run/runit/reboot ] always evaluating to true. This means that when the system is trying to shut down, not reboot, and kexec-tools is installed, it will try to kexec into a new kernel. Of course, this fails when there is no kernel loaded for kexec, but if there is one the system will reboot instead of shutting it down.

Changing the line to an executable check on /run/runit/reboot makes it work as expected on my end, trying to kexec on reboot but not on shutdown.

oynqr avatar Jul 31 '22 14:07 oynqr