Currently /etc/init.d/halt provides a hook into the halt process via an /sbin/halt.local file. If this file exists and is executable, it will be run during the halt process. This makes it possible for system administrators to write their own halt modifier (typically needed when dealing with UPSes and possibly other types of packages). I think it would be very valuable to extend this functionality of /etc/init.d/halt to support a /etc/halt.d/ directory in addition to the halt.local script (Why is halt.local currently not located in /etc along with rc.local and such but in /sbin btw?). This would allow a package (an UPS software package as an example) to drop a halt modifier script in /etc/halt.d/ to take care of prepping the system for halt (rather that poweroff) and initiate a delayed UPS poweroff, if a mains powerloss condition was detected. Currently the package will have to hack either /sbin/halt.local, which could be difficult, or /etc/init.d/halt which would be just plain bad. Usually they will simply leave this out and the system admin will have to set it up manually, for the UPS to work properly. The current version of the /etc/init.d/halt script (from initscripts-8.60-1) includes UPS handling code for the NUT UPS software(i think). NUT could easily be made to use the new /etc/halt.d/ infrastructure too, and /etc/init.d/halt could get rid of the non-generic UPS handling code, which IMHO should be avoided anyway...
If there's a chance it would be accepted, I'll be happy to supply a patch for this functionality.
Adding my use case for the record, from https://www.redhat.com/archives/fedora-devel-list/2007-November/msg01149.html "... my use case is setting the ACPI wakeup time to /proc/acpi/alarm (an essential feature for eg. PVR boxes to have them wake up on time for the next timed recording). /etc/init.d/halt runs hwclock which as a side effect clears the wakeup time, so it needs to be set after hwclock."
I could immediately make use of this feature in the apcupsd package. See this posting on fedora-devel for a description of the ways in which our (apcupsd's) current approach sucks: https://www.redhat.com/archives/fedora-devel-list/2007-November/msg01195.html And an explanation of why rc.0/6 scripts are not sufficient for UPS software: https://www.redhat.com/archives/fedora-devel-list/2007-November/msg01061.html
Adding FutureFeature keyword to RFE's.
Halt is now handled by systemd so closing.