diff options
author | V'yacheslav Stetskevych <slava18@gmail.com> | 2010-06-17 02:52:26 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-06-17 14:42:26 -0500 |
commit | dbebec2717a01c40b62a2da7e53b677954eb47ca (patch) | |
tree | c42b7979842ff65d71e38dab04c6d724db803c61 /system/nut/nut_kill_inverter | |
parent | da30a3f51b9d22e19fe9b692f446526b1c48491e (diff) | |
download | slackbuilds-dbebec2717a01c40b62a2da7e53b677954eb47ca.tar.gz |
system/nut: Added (Network UPS Tools)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/nut/nut_kill_inverter')
-rw-r--r-- | system/nut/nut_kill_inverter | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/system/nut/nut_kill_inverter b/system/nut/nut_kill_inverter new file mode 100644 index 0000000000..251a047df7 --- /dev/null +++ b/system/nut/nut_kill_inverter @@ -0,0 +1,15 @@ +#!/bin/sh +# This file is part of Network UPS Tools build for Slackware Linux. +# It should be sourced in /etc/rc.d/rc.0 as part of the poweroff sequence. +# Here, we signal the UPS to shut off the power. +# Reference: http://www.mail-archive.com/nut-upsdev@lists.alioth.debian.org/msg01099.html +# To be sourced after the genpowerd block and before the actual halt. + +if [ -f /etc/killpower ]; then + echo "----------------------------------------Shutting down UPS power!" + /etc/rc.d/rc.ups shutdown + sleep 40 + echo "The UPS was not shut off properly, or the power came back in the" + echo "middle of the shutdown process, or USB communication failed." + sleep 10 +fi |