APC SU1400XLT User Manual Page 60

  • Download
  • Add to my manuals
  • Print
  • Page
    / 115
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 59
I have two apcupsd.conf files (this is for a 2 UPS setup, easily expandable to N):
[adk0212@mail apcupsd]$ ls -l /etc/apcupsd/*.conf
-rw-r--r-- 1 root root 11799 Aug 3 08:39 /etc/apcupsd/apcupsd.ups0.conf
-rw-r--r-- 1 root root 11822 Aug 25 14:31 /etc/apcupsd/apcupsd.ups1.conf
In my case, ups0 is the UPS powering the UPS server running the multiple apcupsd instances, so only
ups0 should initiate a shutdown of the local machine. The differences between the confs are minor since
both UPSes are USB (although that is not a requirement; mixing cable types works fine too):
[adk0212@mail apcupsd]$ diff -u apcupsd.ups0.conf apcupsd.ups1.conf
--- apcupsd.ups0.conf 2007-08-03 08:39:26.000000000 -0400
+++ apcupsd.ups1.conf 2007-08-25 14:31:17.000000000 -0400
-UPSNAME ups0
+UPSNAME ups1
-DEVICE /dev/ups0
+DEVICE /dev/ups1
-SCRIPTDIR /etc/apcupsd
+SCRIPTDIR /etc/apcupsd/null
-PWRFAILDIR /etc/apcupsd
+PWRFAILDIR /etc/apcupsd/null
-NOLOGINDIR /etc
+NOLOGINDIR /etc/apcupsd/null
-ANNOY 300
+ANNOY 0
-NISPORT 3551
+NISPORT 3552
-EVENTSFILE /var/log/apcupsd.events
+EVENTSFILE /var/log/apcupsd.2.events
The important difference to note is that ups1 has its SCRIPTDIR, PWRFAILDIR, and NOLOGINDIR set to
a special "null" directory that I have created. This directory contains a copy of the event handling scripts
modified to avoid shutting down the local machine. (Details below). Also the UPSes are given different
EVENTSFILE and NISPORT settings. Plus I disable the "annoy" feature on ups1. Since the state of that
UPS does not impact local users, there's no reason to annoy them.
I have the following files in the special "null" directory:
[adk0212@mail apcupsd]$ ls -l /etc/apcupsd/null
total 32
-rwxr--r-- 1 root root 4176 Aug 3 08:24 apccontrol
-rwxr-xr-x 1 root root 475 Aug 3 08:28 changeme
-rwxr-xr-x 1 root root 502 Aug 3 08:28 commfailure
-rwxr-xr-x 1 root root 503 Aug 3 08:28 commok
-rwxr--r-- 1 root root 8 Aug 3 08:22 doshutdown
-rwxr-xr-x 1 root root 470 Aug 3 08:27 offbattery
-rwxr-xr-x 1 root root 435 Aug 3 08:27 onbattery
The important change here is the addition of a 'doshutdown' script which overrides apccontrol's shutdown
action:
[adk0212@mail null]$ cat /etc/apcupsd/null/doshutdown
exit 99
The "exit 99" tells apccontrol to skip its normal processing for that event. apccontrol itself is unchanged; it
is a direct copy of the original. The other scripts are also direct copies and have simply been modified to
Page view 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 ... 114 115

Comments to this Manuals

No comments