--- startup-0.8.2/rc.d/init.d/halt.orig 2003-06-03 18:02:17 +0300 +++ startup-0.8.2/rc.d/init.d/halt 2004-02-16 12:02:10 +0200 @@ -134,6 +134,13 @@ command=/sbin/poweroff fi +UPSCTL=/sbin/upsdrvctl +if [ -x "$UPSCTL" -a -f /etc/killpower ]; then + action "Attempting to turn the UPS off:" "$UPSCTL" shutdown + message="The system is halted" + command=/sbin/poweroff +fi + if [ "$command" = /sbin/poweroff ]; then # Modprobe apm for automatic poweroff at ATX cases. /sbin/modprobe apm >/dev/null 2>&1