From 0bb5cb1d7b77b16b4c0ae9ab058ea2fc116dce58 Mon Sep 17 00:00:00 2001 From: "Danilo G. Baio (dbaio)" Date: Wed, 12 Feb 2014 08:33:03 -0200 Subject: apcupsd - added device field --- config/apcupsd/apcupsd.conf.php | 1 + config/apcupsd/apcupsd.inc | 1 + config/apcupsd/apcupsd.xml | 13 +++++++------ 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'config/apcupsd') diff --git a/config/apcupsd/apcupsd.conf.php b/config/apcupsd/apcupsd.conf.php index 6a19b915..7a0340cd 100644 --- a/config/apcupsd/apcupsd.conf.php +++ b/config/apcupsd/apcupsd.conf.php @@ -109,6 +109,7 @@ UPSCABLE {$upscable} # default of 3052 will be used. # UPSTYPE {$upstype} +{$device} # POLLTIME # Interval (in seconds) at which apcupsd polls the UPS for status. This diff --git a/config/apcupsd/apcupsd.inc b/config/apcupsd/apcupsd.inc index 08ddd17e..a2b8d2ff 100644 --- a/config/apcupsd/apcupsd.inc +++ b/config/apcupsd/apcupsd.inc @@ -139,6 +139,7 @@ function sync_package_apcupsd(){ $upsname=$apcupsd_config['upsname']; $upscable=$apcupsd_config['upscable']; $upstype=$apcupsd_config['upstype']; + $device=($apcupsd_config['device'] != ''? "DEVICE {$apcupsd_config['device']}" : "#DEVICE"); $polltime=($apcupsd_config['polltime'] != ''? $apcupsd_config['polltime'] : "60"); $onbatterydelay=($apcupsd_config['onbatterydelay'] != ''? $apcupsd_config['onbatterydelay'] : "6"); $batterylevel=($apcupsd_config['batterylevel'] != ''? $apcupsd_config['batterylevel'] : "5"); diff --git a/config/apcupsd/apcupsd.xml b/config/apcupsd/apcupsd.xml index 239046e4..85148b2b 100644 --- a/config/apcupsd/apcupsd.xml +++ b/config/apcupsd/apcupsd.xml @@ -157,12 +157,6 @@ UPSTYPE DEVICE Description
catching; you usually want "APC". Port is usually 161. Community is usually "private".

-netsnmp hostname:port:vendor:community - OBSOLETE - Same as SNMP above but requires use of the - net-snmp library. Unless you have a specific need - for this old driver, you should use 'snmp' instead.
-
dumb /dev/tty** Old serial character device for use with simple-signaling UPSes.

@@ -182,6 +176,13 @@ UPSTYPE DEVICE Description
60 true + + Device + device + + input + 60 + Poll Time polltime -- cgit v1.2.3