aboutsummaryrefslogtreecommitdiff
path: root/system/apcupsd/README-SLACKWARE
diff options
context:
space:
mode:
Diffstat (limited to 'system/apcupsd/README-SLACKWARE')
-rw-r--r--system/apcupsd/README-SLACKWARE60
1 files changed, 60 insertions, 0 deletions
diff --git a/system/apcupsd/README-SLACKWARE b/system/apcupsd/README-SLACKWARE
new file mode 100644
index 0000000000000..b4d6a1a93aba8
--- /dev/null
+++ b/system/apcupsd/README-SLACKWARE
@@ -0,0 +1,60 @@
+README-SLACKWARE
+Written by Robby Workman <rworkman@slackbuilds.org>
+
+
+First, see /usr/doc/apcupsd-3.14.0/examples/make-hiddev if you're using
+a 2.4.x kernel and need to manually create the device node(s).
+
+
+Second, 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/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
+