aboutsummaryrefslogtreecommitdiff
path: root/system/apcupsd/README.SLACKWARE
diff options
context:
space:
mode:
authorRobby Workman <rw@rlworkman.net>2010-05-12 17:44:57 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-12 17:44:57 +0200
commit440b72989b3a330594e689c3ef74ab3dbae85519 (patch)
tree634e761f7c8e360e84bfdf13d1fc121eb842192a /system/apcupsd/README.SLACKWARE
parent7e7696327cd7233cec689563f77e01223710b69c (diff)
system/apcupsd: Updated for version 3.14.5
Diffstat (limited to 'system/apcupsd/README.SLACKWARE')
-rw-r--r--system/apcupsd/README.SLACKWARE55
1 files changed, 55 insertions, 0 deletions
diff --git a/system/apcupsd/README.SLACKWARE b/system/apcupsd/README.SLACKWARE
new file mode 100644
index 0000000000000..9587d0e26be0f
--- /dev/null
+++ b/system/apcupsd/README.SLACKWARE
@@ -0,0 +1,55 @@
+README-SLACKWARE
+Written by Robby Workman <rworkman@slackbuilds.org>
+
+You'll need to start the apcupsd service at boot.
+The recommended way is to add the following to your /etc/rc.d/rc.local
+script:
+
+ if [ -x /etc/rc.d/rc.apcupsd ]; then
+ /etc/rc.d/rc.apcupsd start
+ fi
+
+Make sure the rc.apcupsd script is executable.
+
+
+Finally, you'll need to edit your /etc/rc.d/rc.6 script for apcupsd
+to perform the shutdown on power failures. Here's the short version:
+Scroll down to the end of rc.6 - you should see a section that calls
+/sbin/genpowerd. Comment out (or remove) this entire section:
+
+ if [ -x /sbin/genpowerd ]; then
+ # See if this is a powerfail situation:
+ if /bin/egrep -q "FAIL|SCRAM" /etc/upsstatus 2> /dev/null ; then
+ # Signal UPS to shut off the inverter:
+ /sbin/genpowerd -k
+ if [ ! $? = 0 ]; then
+ echo
+ echo "There was an error signaling the UPS."
+ echo "Perhaps you need to edit /etc/genpowerd.conf to configure"
+ echo "the serial line and UPS type."
+ # Wasting 15 seconds of precious power:
+ /bin/sleep 15
+ fi
+ fi
+ fi
+
+
+Now replace that section with this (or add immediately after it if you
+chose to comment out the original):
+
+ # This will cause the UPS to kill the power supply after a configurable number
+ # of seconds (see the apcupsd.conf file). This is important for situations
+ # where the mains power comes back before the UPS batteries are completely
+ # dead.
+ if [ -f /etc/apcupsd/powerfail ]; then
+ echo
+ echo "apcupsd will now power off the UPS"
+ echo
+ /etc/apcupsd/apccontrol killpower
+ echo
+ echo "Please ensure that the UPS has powered off before rebooting."
+ echo "Otherwise, the UPS may cut the power during the reboot."
+ echo
+ halt -f -p # power down the system if the hardware is capable
+ fi
+