Description of problem: /etc/init.d/halt calls if it exists /sbin/halt.local. It would be nice to have parameters like "$message" "$HALTARGS" "$kexec_command" "$command" being passed to /sbin/halt.local. This leads to a /sbin/halt.local with better knowledge of how it was called. Version-Release number of selected component (if applicable): rhel5, fedora How reproducible: Create a /sbin/halt.local and you never know if it should reboot or not. Steps to Reproduce: 1. 2. 3. Actual results: halt.local should somehow know if it should be called as reboot or halt or power off. Therefore parameters might be an idea. Expected results: halt.local should be aware of that. Additional info:
Created attachment 340527 [details] This patch changes /etc/init.d/halt so that it calls halt.local with some parameters defined in /etc/init.d/halt
Well, the idea is that halt.local isn't necessarily doing all those things itself, so it shouldn't need that much information; it should not need to care about kexec, or what messages to echo, etc. But some of it could be useful.
I agreed. I just added all parameters to halt.local that are defined in halt. But I agree "$message" and "$HALTARGS" are enough.
We don't have /etc/init.d/halt anymore, so closing.
Created attachment 601731 [details] Changes /etc/init.d/halt to call halt.local with variables used in halt as parameters. halt.local is called with $message, $command, $HALTARGS and $kexec_command parameters in this patch. First three parameters have always some value, but $kexec_command is set only if $command is "reboot". I also moved definition of $HALTARGS above the halt.local call, because otherwise it would be always unset.