head 1.8; access; symbols pkgsrc-2013Q2:1.8.0.2 pkgsrc-2013Q2-base:1.8 pkgsrc-2012Q4:1.7.0.12 pkgsrc-2012Q4-base:1.7 pkgsrc-2012Q3:1.7.0.10 pkgsrc-2012Q3-base:1.7 pkgsrc-2012Q2:1.7.0.8 pkgsrc-2012Q2-base:1.7 pkgsrc-2012Q1:1.7.0.6 pkgsrc-2012Q1-base:1.7 pkgsrc-2011Q4:1.7.0.4 pkgsrc-2011Q4-base:1.7 pkgsrc-2011Q3:1.7.0.2 pkgsrc-2011Q3-base:1.7 pkgsrc-2011Q2:1.6.0.48 pkgsrc-2011Q2-base:1.6 pkgsrc-2009Q4:1.6.0.46 pkgsrc-2009Q4-base:1.6 pkgsrc-2008Q4:1.6.0.44 pkgsrc-2008Q4-base:1.6 pkgsrc-2008Q3:1.6.0.42 pkgsrc-2008Q3-base:1.6 cube-native-xorg:1.6.0.40 cube-native-xorg-base:1.6 pkgsrc-2008Q2:1.6.0.38 pkgsrc-2008Q2-base:1.6 pkgsrc-2008Q1:1.6.0.36 pkgsrc-2008Q1-base:1.6 pkgsrc-2007Q4:1.6.0.34 pkgsrc-2007Q4-base:1.6 pkgsrc-2007Q3:1.6.0.32 pkgsrc-2007Q3-base:1.6 pkgsrc-2007Q2:1.6.0.30 pkgsrc-2007Q2-base:1.6 pkgsrc-2007Q1:1.6.0.28 pkgsrc-2007Q1-base:1.6 pkgsrc-2006Q4:1.6.0.26 pkgsrc-2006Q4-base:1.6 pkgsrc-2006Q3:1.6.0.24 pkgsrc-2006Q3-base:1.6 pkgsrc-2006Q2:1.6.0.22 pkgsrc-2006Q2-base:1.6 pkgsrc-2006Q1:1.6.0.20 pkgsrc-2006Q1-base:1.6 pkgsrc-2005Q4:1.6.0.18 pkgsrc-2005Q4-base:1.6 pkgsrc-2005Q3:1.6.0.16 pkgsrc-2005Q3-base:1.6 pkgsrc-2005Q2:1.6.0.14 pkgsrc-2005Q2-base:1.6 pkgsrc-2005Q1:1.6.0.12 pkgsrc-2005Q1-base:1.6 pkgsrc-2004Q4:1.6.0.10 pkgsrc-2004Q4-base:1.6 pkgsrc-2004Q3:1.6.0.8 pkgsrc-2004Q3-base:1.6 pkgsrc-2004Q2:1.6.0.6 pkgsrc-2004Q2-base:1.6 pkgsrc-2004Q1:1.6.0.4 pkgsrc-2004Q1-base:1.6 pkgsrc-2003Q4:1.6.0.2 pkgsrc-2003Q4-base:1.6 buildlink2:1.4.0.4 netbsd-1-6:1.4.0.6 netbsd-1-6-RELEASE-base:1.4 pkgviews:1.4.0.2 pkgviews-base:1.4 buildlink2-base:1.4 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.8 date 2013.02.16.17.37.01; author jdf; state dead; branches; next 1.7; 1.7 date 2011.07.29.15.11.40; author bouyer; state Exp; branches; next 1.6; 1.6 date 2002.12.13.04.23.19; author lukem; state dead; branches; next 1.5; 1.5 date 2002.08.25.21.51.06; author jlam; state Exp; branches; next 1.4; 1.4 date 2002.07.03.11.57.13; author lukem; state Exp; branches 1.4.4.1; next 1.3; 1.3 date 2001.03.11.19.20.51; author martin; state dead; branches; next 1.2; 1.2 date 2001.03.11.13.46.12; author martin; state Exp; branches; next 1.1; 1.1 date 2000.12.28.16.06.13; author martin; state Exp; branches 1.1.1.1; next ; 1.4.4.1 date 2002.07.03.11.57.13; author jlam; state dead; branches; next 1.4.4.2; 1.4.4.2 date 2002.08.25.21.21.32; author jlam; state Exp; branches; next ; 1.1.1.1 date 2000.12.28.16.06.13; author martin; state Exp; branches; next ; desc @@ 1.8 log @patches/patch-ac has been applied by upstream. @ text @$NetBSD: patch-ac,v 1.7 2011/07/29 15:11:40 bouyer Exp $ Improve netvision handling (especially, add 3-phase support) Submitted upstream as tracker #313197 --- drivers/netvision-mib.c.orig 2011-05-31 12:36:49.000000000 +0200 +++ drivers/netvision-mib.c 2011-06-30 00:12:14.000000000 +0200 @@@@ -49,8 +49,12 @@@@ #define NETVISION_OID_BATT_VOLTS ".1.3.6.1.4.1.4555.1.1.1.1.2.5.0" #define NETVISION_OID_INPUT_NUM_LINES ".1.3.6.1.4.1.4555.1.1.1.1.3.1.0" /* 1phase or 3phase UPS input */ +#define NETVISION_OID_INPUT_FREQ ".1.3.6.1.4.1.4555.1.1.1.1.3.2.0" #define NETVISION_OID_OUTPUT_NUM_LINES ".1.3.6.1.4.1.4555.1.1.1.1.4.3.0" /* 1phase or 3phase UPS output */ +#define NETVISION_OID_OUTPUT_FREQ ".1.3.6.1.4.1.4555.1.1.1.1.4.2.0" +#define NETVISION_OID_BYPASS_FREQ ".1.3.6.1.4.1.4555.1.1.1.1.5.1.0" +#define NETVISION_OID_BYPASS_NUM_LINES ".1.3.6.1.4.1.4555.1.1.1.1.5.2.0" /* 1phase or 3phase UPS input */ /* three phase ups provide input/output/load for each phase in case of one-phase output, only _P1 should be used @@@@ -60,19 +64,31 @@@@ #define NETVISION_OID_OUT_CURRENT_P1 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.3.1" #define NETVISION_OID_OUT_LOAD_PCT_P1 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.4.1" #define NETVISION_OID_IN_VOLTAGE_P1 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.5.1" +#define NETVISION_OID_IN_CURRENT_P1 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.3.1" +#define NETVISION_OID_BY_VOLTAGE_P1 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.2.1" +#define NETVISION_OID_BY_CURRENT_P1 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.3.1" #define NETVISION_OID_OUT_VOLTAGE_P2 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.2.2" #define NETVISION_OID_OUT_CURRENT_P2 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.3.2" #define NETVISION_OID_OUT_LOAD_PCT_P2 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.4.2" #define NETVISION_OID_IN_VOLTAGE_P2 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.5.2" +#define NETVISION_OID_IN_CURRENT_P2 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.3.2" +#define NETVISION_OID_BY_VOLTAGE_P2 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.2.2" +#define NETVISION_OID_BY_CURRENT_P2 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.3.2" #define NETVISION_OID_OUT_VOLTAGE_P3 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.2.3" #define NETVISION_OID_OUT_CURRENT_P3 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.3.3" #define NETVISION_OID_OUT_LOAD_PCT_P3 ".1.3.6.1.4.1.4555.1.1.1.1.4.4.1.4.3" #define NETVISION_OID_IN_VOLTAGE_P3 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.5.3" +#define NETVISION_OID_IN_CURRENT_P3 ".1.3.6.1.4.1.4555.1.1.1.1.3.3.1.3.3" +#define NETVISION_OID_BY_VOLTAGE_P3 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.2.3" +#define NETVISION_OID_BY_CURRENT_P3 ".1.3.6.1.4.1.4555.1.1.1.1.5.3.1.3.3" #define NETVISION_OID_OUTPUT_SOURCE ".1.3.6.1.4.1.4555.1.1.1.1.4.1.0" +#define NETVISION_OID_CONTROL_STATUS ".1.3.6.1.4.1.4555.1.1.1.1.8.1" +#define NETVISION_OID_CONTROL_SHUTDOWN_DELAY ".1.3.6.1.4.1.4555.1.1.1.1.8.2" + static info_lkp_t netvision_output_info[] = { { 1, "" }, /* output source other */ { 2, "" }, /* output source none */ @@@@ -102,12 +118,45 @@@@ SU_FLAG_OK | SU_STATUS_PWR, &netvision_output_info[0] }, /* ups load */ - { "ups.load", 0, 1, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_FLAG_OK, NULL }, + { "ups.load", 0, 1, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_INPUT_1, NULL }, /*ups input,output voltage, output frquency phase 1 */ - { "input.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P1, 0, SU_FLAG_OK, NULL }, - { "output.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P1, 0, SU_FLAG_OK, NULL }, - { "output.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P1, 0, SU_FLAG_OK, NULL }, + { "input.phases", 0, 1.0, NETVISION_OID_INPUT_NUM_LINES, 0, SU_FLAG_SETINT, NULL, &input_phases }, + { "input.frequency", 0, 0.1, NETVISION_OID_INPUT_FREQ, 0, SU_FLAG_OK, NULL }, + { "input.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P1, 0, SU_INPUT_1, NULL }, + { "input.current", 0, 0.1, NETVISION_OID_IN_CURRENT_P1, 0, SU_INPUT_1, NULL }, + { "input.L1-N.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P1, 0, SU_INPUT_3, NULL }, + { "input.L1.current", 0, 0.1, NETVISION_OID_IN_CURRENT_P1, 0, SU_INPUT_3, NULL }, + { "input.L2-N.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P2, 0, SU_INPUT_3, NULL }, + { "input.L2.current", 0, 0.1, NETVISION_OID_IN_CURRENT_P2, 0, SU_INPUT_3, NULL }, + { "input.L3-N.voltage", 0, 0.1, NETVISION_OID_IN_VOLTAGE_P3, 0, SU_INPUT_3, NULL }, + { "input.L3.current", 0, 0.1, NETVISION_OID_IN_CURRENT_P3, 0, SU_INPUT_3, NULL }, + + { "output.phases", 0, 1.0, NETVISION_OID_OUTPUT_NUM_LINES, 0, SU_FLAG_SETINT, NULL, &output_phases }, + { "output.frequency", 0, 0.1, NETVISION_OID_OUTPUT_FREQ, 0, SU_FLAG_OK, NULL }, + { "output.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P1, 0, SU_OUTPUT_1, NULL }, + { "output.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P1, 0, SU_OUTPUT_1, NULL }, + { "output.load", 0, 1.0, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_OUTPUT_1, NULL }, + { "output.L1-N.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P1, 0, SU_OUTPUT_3, NULL }, + { "output.L1.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P1, 0, SU_OUTPUT_3, NULL }, + { "output.L1.power.percent", 0, 1.0, NETVISION_OID_OUT_LOAD_PCT_P1, 0, SU_OUTPUT_3, NULL }, + { "output.L2-N.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P2, 0, SU_OUTPUT_3, NULL }, + { "output.L2.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P2, 0, SU_OUTPUT_3, NULL }, + { "output.L2.power.percent", 0, 1.0, NETVISION_OID_OUT_LOAD_PCT_P2, 0, SU_OUTPUT_3, NULL }, + { "output.L3-N.voltage", 0, 0.1, NETVISION_OID_OUT_VOLTAGE_P3, 0, SU_OUTPUT_3, NULL }, + { "output.L3.current", 0, 0.1, NETVISION_OID_OUT_CURRENT_P3, 0, SU_OUTPUT_3, NULL }, + { "output.L3.power.percent", 0, 1.0, NETVISION_OID_OUT_LOAD_PCT_P3, 0, SU_OUTPUT_3, NULL }, + + { "input.bypass.phases", 0, 1.0, NETVISION_OID_BYPASS_NUM_LINES, 0, SU_FLAG_SETINT, NULL, &bypass_phases }, + { "input.bypass.frequency", 0, 0.1, NETVISION_OID_BYPASS_FREQ, 0, SU_FLAG_OK, NULL }, + { "input.bypass.voltage", 0, 0.1, NETVISION_OID_BY_VOLTAGE_P1, 0, SU_BYPASS_1, NULL }, + { "input.bypass.current", 0, 0.1, NETVISION_OID_BY_CURRENT_P1, 0, SU_BYPASS_1, NULL }, + { "input.bypass.L1-N.voltage", 0, 0.1, NETVISION_OID_BY_VOLTAGE_P1, 0, SU_BYPASS_3, NULL }, + { "input.bypass.L1.current", 0, 0.1, NETVISION_OID_BY_CURRENT_P1, 0, SU_BYPASS_3, NULL }, + { "input.bypass.L2-N.voltage", 0, 0.1, NETVISION_OID_BY_VOLTAGE_P2, 0, SU_BYPASS_3, NULL }, + { "input.bypass.L2.current", 0, 0.1, NETVISION_OID_BY_CURRENT_P2, 0, SU_BYPASS_3, NULL }, + { "input.bypass.L3-N.voltage", 0, 0.1, NETVISION_OID_BY_VOLTAGE_P3, 0, SU_BYPASS_3, NULL }, + { "input.bypass.L3.current", 0, 0.1, NETVISION_OID_BY_CURRENT_P3, 0, SU_BYPASS_3, NULL }, /* battery info */ { "battery.charge", 0, 1, NETVISION_OID_BATT_CHARGE, "", SU_FLAG_OK, NULL }, @ 1.7 log @Update ups-nut* from 2.0.5 to 2.6.1. Changes are too large to list here, see: http://www.networkupstools.org/source/2.6/new-2.6.1.txt @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.9 2004/02/15 13:14:25 lukem Exp $ @ 1.6 log @Update from nut 0.50.0 to 1.2.1. Many changes, too many to list here. See: http://www.exploits.org/nut/release/1.2/new-1.2.1.txt and (after installation): /usr/pkg/share/doc/nut/UPGRADING @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.5 2002/08/25 21:51:06 jlam Exp $ d3 86 a88 12 --- clients/upslog.c.orig Fri May 17 08:26:22 2002 +++ clients/upslog.c @@@@ -180,6 +180,13 @@@@ void print_status(void) continue; } + /* if a %%, append % and start over */ + if (logformat[i+1] == '%') { + snprintfcat(logbuffer, sizeof(logbuffer), "%%"); + i++; + continue; + } d90 10 a99 1 /* it must start with a % now - %[ ]%*/ d101 2 a102 1 cmd = xstrdup(&logformat[i+1]); @ 1.5 log @Merge packages from the buildlink2 branch back into the main trunk that have been converted to USE_BUILDLINK2. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.4.4.1 2002/08/25 21:21:32 jlam Exp $ @ 1.4 log @update to nut 0.50.0. notable changes: - change from tcp/ip port 3305 to the IANA assigned 3493 - all old-style drivers have been deprecated: aeg bestfort bestuferrups engetron ipt-anzen mgeups multilink mustekups optiups sms toshiba1500 ups-trust425+625 upseyeux - newvictron renamed to victronups - newpowercom renamed to powercom, replacing previous powercom and ups-trust425+625 as well @ text @d1 1 a1 1 $NetBSD$ @ 1.4.4.1 log @file patch-ac was added on branch buildlink2 on 2002-08-25 21:21:32 +0000 @ text @d1 18 @ 1.4.4.2 log @Merge changes in the main trunk into the buildlink2 branch for those packages that have been converted to USE_BUILDLINK2. @ text @a0 18 $NetBSD: patch-ac,v 1.4.4.1 2002/08/25 21:21:32 jlam Exp $ --- clients/upslog.c.orig Fri May 17 08:26:22 2002 +++ clients/upslog.c @@@@ -180,6 +180,13 @@@@ void print_status(void) continue; } + /* if a %%, append % and start over */ + if (logformat[i+1] == '%') { + snprintfcat(logbuffer, sizeof(logbuffer), "%%"); + i++; + continue; + } + /* it must start with a % now - %[ ]%*/ cmd = xstrdup(&logformat[i+1]); @ 1.3 log @Bring upsd startup script more in line with /etc/rc.d and /etc/rc.conf. Now updating does not destroy parts of the local configuration any more. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.2 2001/03/11 13:46:12 martin Exp $ d3 12 a14 9 diff -Pur scripts-orig/NetBSD/upsd.sh scripts/NetBSD/upsd.sh --- scripts-orig/NetBSD/upsd Wed Dec 31 16:00:00 1969 +++ scripts/NetBSD/upsd Thu Dec 14 21:19:34 2000 @@@@ -0,0 +1,15 @@@@ +#!/bin/sh +UPS_DRIVER="apcsmart" +DRIVER_OPTIONS="" +SPECIAL_FILE="/dev/dty00" +MONITOR_HOST="localhost" d16 3 a18 9 +if [ -z "$1" -o "x$1" = xstart ] +then + if [ x$MONITOR_HOST = xlocalhost ] + then + %%PREFIX%%/bin/$UPS_DRIVER $DRIVER_OPTIONS $SPECIAL_FILE + %%PREFIX%%/sbin/upsd + fi + %%PREFIX%%/sbin/upsmon $MONITOR_HOST +fi @ 1.2 log @Update ups-nut to 0.44.3 prerelease 5. Changes are too much to list here, see "Changes" in the distribution for a detailed list. Various bugfixes and enhancements. Based on a package provided by collver@@linuxfreemail.com. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Initial revision @ text @@ 1.1.1.1 log @Initial import of ups-nut pkg (network ups tools), a collection of tools used to monitor various UPSes. Pkg from collver@@softhome.net with minor modifications. Closes PR 11745. @ text @@