head 1.6; access; symbols pkgsrc-2026Q1:1.6.0.46 pkgsrc-2026Q1-base:1.6 pkgsrc-2025Q4:1.6.0.44 pkgsrc-2025Q4-base:1.6 pkgsrc-2025Q3:1.6.0.42 pkgsrc-2025Q3-base:1.6 pkgsrc-2025Q2:1.6.0.40 pkgsrc-2025Q2-base:1.6 pkgsrc-2025Q1:1.6.0.38 pkgsrc-2025Q1-base:1.6 pkgsrc-2024Q4:1.6.0.36 pkgsrc-2024Q4-base:1.6 pkgsrc-2024Q3:1.6.0.34 pkgsrc-2024Q3-base:1.6 pkgsrc-2024Q2:1.6.0.32 pkgsrc-2024Q2-base:1.6 pkgsrc-2024Q1:1.6.0.30 pkgsrc-2024Q1-base:1.6 pkgsrc-2023Q4:1.6.0.28 pkgsrc-2023Q4-base:1.6 pkgsrc-2023Q3:1.6.0.26 pkgsrc-2023Q3-base:1.6 pkgsrc-2023Q2:1.6.0.24 pkgsrc-2023Q2-base:1.6 pkgsrc-2023Q1:1.6.0.22 pkgsrc-2023Q1-base:1.6 pkgsrc-2022Q4:1.6.0.20 pkgsrc-2022Q4-base:1.6 pkgsrc-2022Q3:1.6.0.18 pkgsrc-2022Q3-base:1.6 pkgsrc-2022Q2:1.6.0.16 pkgsrc-2022Q2-base:1.6 pkgsrc-2022Q1:1.6.0.14 pkgsrc-2022Q1-base:1.6 pkgsrc-2021Q4:1.6.0.12 pkgsrc-2021Q4-base:1.6 pkgsrc-2021Q3:1.6.0.10 pkgsrc-2021Q3-base:1.6 pkgsrc-2021Q2:1.6.0.8 pkgsrc-2021Q2-base:1.6 pkgsrc-2021Q1:1.6.0.6 pkgsrc-2021Q1-base:1.6 pkgsrc-2020Q4:1.6.0.4 pkgsrc-2020Q4-base:1.6 pkgsrc-2020Q3:1.6.0.2 pkgsrc-2020Q3-base:1.6 pkgsrc-2020Q2:1.5.0.70 pkgsrc-2020Q2-base:1.5 pkgsrc-2020Q1:1.5.0.50 pkgsrc-2020Q1-base:1.5 pkgsrc-2019Q4:1.5.0.72 pkgsrc-2019Q4-base:1.5 pkgsrc-2019Q3:1.5.0.68 pkgsrc-2019Q3-base:1.5 pkgsrc-2019Q2:1.5.0.66 pkgsrc-2019Q2-base:1.5 pkgsrc-2019Q1:1.5.0.64 pkgsrc-2019Q1-base:1.5 pkgsrc-2018Q4:1.5.0.62 pkgsrc-2018Q4-base:1.5 pkgsrc-2018Q3:1.5.0.60 pkgsrc-2018Q3-base:1.5 pkgsrc-2018Q2:1.5.0.58 pkgsrc-2018Q2-base:1.5 pkgsrc-2018Q1:1.5.0.56 pkgsrc-2018Q1-base:1.5 pkgsrc-2017Q4:1.5.0.54 pkgsrc-2017Q4-base:1.5 pkgsrc-2017Q3:1.5.0.52 pkgsrc-2017Q3-base:1.5 pkgsrc-2017Q2:1.5.0.48 pkgsrc-2017Q2-base:1.5 pkgsrc-2017Q1:1.5.0.46 pkgsrc-2017Q1-base:1.5 pkgsrc-2016Q4:1.5.0.44 pkgsrc-2016Q4-base:1.5 pkgsrc-2016Q3:1.5.0.42 pkgsrc-2016Q3-base:1.5 pkgsrc-2016Q2:1.5.0.40 pkgsrc-2016Q2-base:1.5 pkgsrc-2016Q1:1.5.0.38 pkgsrc-2016Q1-base:1.5 pkgsrc-2015Q4:1.5.0.36 pkgsrc-2015Q4-base:1.5 pkgsrc-2015Q3:1.5.0.34 pkgsrc-2015Q3-base:1.5 pkgsrc-2015Q2:1.5.0.32 pkgsrc-2015Q2-base:1.5 pkgsrc-2015Q1:1.5.0.30 pkgsrc-2015Q1-base:1.5 pkgsrc-2014Q4:1.5.0.28 pkgsrc-2014Q4-base:1.5 pkgsrc-2014Q3:1.5.0.26 pkgsrc-2014Q3-base:1.5 pkgsrc-2014Q2:1.5.0.24 pkgsrc-2014Q2-base:1.5 pkgsrc-2014Q1:1.5.0.22 pkgsrc-2014Q1-base:1.5 pkgsrc-2013Q4:1.5.0.20 pkgsrc-2013Q4-base:1.5 pkgsrc-2013Q3:1.5.0.18 pkgsrc-2013Q3-base:1.5 pkgsrc-2013Q2:1.5.0.16 pkgsrc-2013Q2-base:1.5 pkgsrc-2013Q1:1.5.0.14 pkgsrc-2013Q1-base:1.5 pkgsrc-2012Q4:1.5.0.12 pkgsrc-2012Q4-base:1.5 pkgsrc-2012Q3:1.5.0.10 pkgsrc-2012Q3-base:1.5 pkgsrc-2012Q2:1.5.0.8 pkgsrc-2012Q2-base:1.5 pkgsrc-2012Q1:1.5.0.6 pkgsrc-2012Q1-base:1.5 pkgsrc-2011Q4:1.5.0.4 pkgsrc-2011Q4-base:1.5 pkgsrc-2011Q3:1.5.0.2 pkgsrc-2011Q3-base:1.5 pkgsrc-2011Q2:1.4.0.38 pkgsrc-2011Q2-base:1.4 pkgsrc-2011Q1:1.4.0.36 pkgsrc-2011Q1-base:1.4 pkgsrc-2010Q4:1.4.0.34 pkgsrc-2010Q4-base:1.4 pkgsrc-2010Q3:1.4.0.32 pkgsrc-2010Q3-base:1.4 pkgsrc-2010Q2:1.4.0.30 pkgsrc-2010Q2-base:1.4 pkgsrc-2010Q1:1.4.0.28 pkgsrc-2010Q1-base:1.4 pkgsrc-2009Q4:1.4.0.26 pkgsrc-2009Q4-base:1.4 pkgsrc-2009Q3:1.4.0.24 pkgsrc-2009Q3-base:1.4 pkgsrc-2009Q2:1.4.0.22 pkgsrc-2009Q2-base:1.4 pkgsrc-2009Q1:1.4.0.20 pkgsrc-2009Q1-base:1.4 pkgsrc-2008Q4:1.4.0.18 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.16 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.14 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.12 pkgsrc-2008Q2-base:1.4 cwrapper:1.4.0.10 pkgsrc-2008Q1:1.4.0.8 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.6 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.4 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.2 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.3.0.28 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.26 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.24 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.22 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.20 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.18 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.16 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.14 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.12 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.10 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.8 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.6 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.4 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.2 pkgsrc-2003Q4-base:1.3 netbsd-1-6:1.2.0.8 netbsd-1-6-RELEASE-base:1.2 pkgviews:1.2.0.4 pkgviews-base:1.2 buildlink2:1.2.0.2 buildlink2-base:1.2 netbsd-1-5-PATCH003:1.2 netbsd-1-5-PATCH001:1.2 netbsd-1-5-RELEASE:1.2 netbsd-1-4-PATCH003:1.2 netbsd-1-4-PATCH002:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.6 date 2020.09.19.13.50.48; author taca; state Exp; branches; next 1.5; commitid 5Wq8qcCEfJ2taFoC; 1.5 date 2011.08.01.14.54.51; author bouyer; state Exp; branches; next 1.4; 1.4 date 2007.06.15.21.15.39; author bouyer; state Exp; branches 1.4.38.1; next 1.3; 1.3 date 2002.12.01.22.32.28; author bouyer; state dead; branches; next 1.2; 1.2 date 2000.08.05.07.31.21; author jlam; state Exp; branches; next 1.1; 1.1 date 2000.01.21.19.16.00; author bouyer; state Exp; branches 1.1.1.1; next ; 1.4.38.1 date 2011.08.07.09.39.48; author tron; state Exp; branches; next ; 1.1.1.1 date 2000.01.21.19.16.00; author bouyer; state Exp; branches; next ; desc @@ 1.6 log @sysutils/apcupsd: update to 3.14.14 Update apcupsd package to 3.14.14. 3.14.14 -- 31 May 2016 BUG FIXES * win32: Fix missing DLLs when installing only apctray * Fixes for socket error handling. Resolves apcaccess crash when connection fails as well as several other theoretical issues. * MODBUS/USB error handling (COMMLOST) improvements for faulty USB links * Fix hiddev binding when usbfs is mounted on /dev/bus/usb instead of /proc/bus/usb. This is necessary for switching between MODBUS/USB and USB/HID on Linux. * Update GPLv2 text and FSF address to match current versions from FSF. * Various fixes for potential issues suggested by Coverity Scan * MacOS X port support for El Capitan System Integrity Protection (SIP) aka "rootless" * Fix shutdown failure on Windows when UPSNAME includes spaces * Fix building bsd-usb driver (This was broken when modbus-usb support was added.) FEATURES * Add status display for output current as well as apparent power @ text @$NetBSD: patch-ai,v 1.5 2011/08/01 14:54:51 bouyer Exp $ * Fix installation for pkgsrc. --- platforms/netbsd/Makefile.orig 2011-08-01 15:45:29.000000000 +0200 +++ platforms/netbsd/Makefile 2011-08-01 15:45:49.000000000 +0200 @@@@ -7,58 +7,5 @@@@ all-uninstall: uninstall-netbsd install-netbsd: - $(call DISTINST,NetBSD) - $(call MKDIR,/etc) - $(call INSTPROG,744,apcupsd,/etc/rc.apcupsd) - $(VV)-today="`date +%Y%m%d%H%M`"; \ - grep -q '# TAG_APCUPSD' /etc/rc.shutdown; \ - if [ $$? -ne 0 ]; then \ - echo " PATCH $(DESTDIR)/etc/rc.shutdown"; \ - rm -f $(DESTDIR)/etc/rc.shutdown.$$today; \ - cp -p /etc/rc.shutdown $(DESTDIR)/etc/rc.shutdown.$$today; \ - ( echo "# Do not remove the 'TAG_APCUPSD' text, below"; \ - echo "if [ -f $(PWRFAILDIR)/powerfail ]; then # TAG_APCUPSD";\ - echo " powerdown=YES # TAG_APCUPSD"; \ - echo " echo '' # TAG_APCUPSD"; \ - echo " echo 'Please ensure that the UPS has powered off before' # TAG_APCUPSD"; \ - echo " echo 'rebooting. Otherwise, the UPS may cut the power' # TAG_APCUPSD"; \ - echo " echo 'during the reboot.' # TAG_APCUPSD"; \ - echo " echo '' # TAG_APCUPSD"; \ - echo "fi # TAG_APCUPSD"; \ - ) >> $(DESTDIR)/etc/rc.shutdown; \ - fi; \ - grep -q /etc/rc.apcupsd /etc/rc.local; \ - if [ $$? -ne 0 ]; then \ - echo " PATCH $(DESTDIR)/etc/rc.local"; \ - rm -f $(DESTDIR)/etc/rc.local.$$today; \ - cp -p /etc/rc.local $(DESTDIR)/etc/rc.local.$$today; \ - ( echo "# Start the UPS daemon. Do not remove the 'TAG_APCUPSD' text"; \ - echo "# if [ -x /etc/rc.apcupsd ]; then # TAG_APCUPSD"; \ - echo "# /etc/rc.apcupsd start # TAG_APCUPSD"; \ - echo "# fi # TAG_APCUPSD"; \ - ) >> $(DESTDIR)/etc/rc.local; \ - echo ""; \ - ( echo "While /etc/rc.local has been patched to run apcupsd,";\ - echo "the commands are currently commented out. You should"; \ - echo "examine the $(sysconfdir)/apcupsd.conf file to ensure"; \ - echo "that it is suitable for your site. Then run"; \ - echo "/etc/rc.apcupsd manually to ensure sane operation."; \ - echo "Once you are satisfied, uncomment the appropriate"; \ - echo "lines in /etc/rc.local" ) | /usr/bin/fmt; \ - fi uninstall-netbsd: - $(call DISTUNINST,NetBSD) - -$(call UNINST,/etc/rc.apcupsd) - $(VV)-today="`date +%Y%m%d%H%M`"; \ - for f in $(DESTDIR)/etc/rc.local $(DESTDIR)/etc/rc.shutdown; do \ - grep -q '# TAG_APCUPSD' $$f; \ - if [ $$? -eq 0 ]; then \ - echo " PATCH $$f"; \ - rm -f $$f.$$today; \ - cp -p $$f $$f.$$today; \ - $(SED) -e '/TAG_APCUPSD/d;' \ - < $$f.$$today > $$f; \ - chmod 644 $$f; \ - fi; \ - done @ 1.5 log @Update to 3.14.9. Dragonfly users, please test that is still builds ! pkgsrc change: as snmp support doesn't depend on net-snmp anymore, remove snmp option and always build snmp support. cgi option now depend on graphics/gd/ User-visible changes sinces 3.14.3: 2010-08-30 14:18 adk0212 * src/drivers/snmplite/: mge-mib.cpp, mge-oids.h, mibs.cpp: Add support for MGE SNMP MIB. Contributed by Lars Täer 2010-07-30 18:04 adk0212 * src/drivers/snmplite/: apc-mib.cpp, apc-oids.h, mib.cpp, oids.h, rfc1628-mib.cpp, rfc1628-oids.h, snmplite.cpp, snmplite.h: Add support for RFC1628 SNMP MIB. Refactor APC MIB and create MibStrategy struct for associating MIB/CI mapping with corresponding processing function. RFC1628 strategy is coded per the MIB but untested. 2010-01-10 10:29 adk0212 * include/defines.h, src/apctest.c, src/drivers/usb/usb.c: Add apctest support for reading/setting self-test interval on USB. Also show current setting in UPS status. Contributed by James Belleau 2009-10-25 11:03 adk0212 * configure, autoconf/config.h.in, autoconf/configure.in, autoconf/variables.mak.in, include/struct.h, platforms/etc/apcupsd.conf.in, src/drivers/Makefile, src/drivers/drivers.c, src/drivers/snmplite/Makefile, src/drivers/snmplite/asn.cpp, src/drivers/snmplite/asn.h, src/drivers/snmplite/mib.cpp, src/drivers/snmplite/snmp.cpp, src/drivers/snmplite/snmp.h, src/drivers/snmplite/snmplite.cpp, src/drivers/snmplite/snmplite.h, src/lib/apcconfig.c, src/lib/apcstatus.c: Add SNMP Lite driver which does not depend on net-snmp library. This makes it more portable and eliminates need to move libsnmp.so to /lib in order to do a killpower on systems where /usr is unmounted. 2009-09-01 20:30 adk0212 * src/apctest.c: Implement battery calibration in apctest for USB models. Thanks to James Belleau for the original implementation which has been modified somewhat in this commit. 2009-05-02 10:30 adk0212 * src/action.c: Change log level of UPS self-test messages to WARNING from ALERT. Given that self-test messages are routine, they do not belong at LOG_ALERT. Contributed by Dave Ewart . 2009-04-25 10:58 adk0212 * src/lib/apcconfig.c: Remove EVENTFILE, EVENTFILEMAX config directives. These were replaced by the plural versions that are in use today (EVENTSFILE, EVENTSFILEMAX) almost 10 years ago. It's time to kill the old names. (h/t Trevor Roydhouse ) 2009-03-02 17:48 adk0212 * doc/apcupsd.man, include/drivers.h, include/extern.h, src/action.c, src/apctest.c, src/apcupsd.c, src/device.c, src/options.c, src/drivers/drivers.c, src/drivers/apcsmart/apcsmart.h, src/drivers/apcsmart/smart.c, src/drivers/apcsmart/smartoper.c, src/drivers/usb/usb.c, src/drivers/usb/usb.h, src/lib/apclock.c: Add support for turning the UPS off completely. This complements existing hibernate (aka killpower) functionality. Turn-off is implemented for apcsmart and USB drivers, subject to support for the relevant commands in the UPS itself. Contributed by Keith Campbell . 2008-06-29 11:12 adk0212 * src/action.c: Fix bug in LOWBATT glitch handling. We must examine LOWBATT for changes every time thru the status loop, not just during the OnBattery state. Otherwise we can miss the initial LOWBATT assertion, which defeats the glitch rejection logic. 2008-05-06 20:16 skoona * src/gapcmon/gapcmon.c: Corrected the use of NOMPOWER and the calc of current usage amount 2008-05-04 11:13 adk0212 * src/drivers/usb/usb.c: Add a heuristic to fix up incorrect NOMINV or NOMOUTV. Some UPSes (RS 500) report decivolts instead of volts. Reported by Kirill S. Bychkov . 2008-01-27 12:00 adk0212 * include/struct.h, platforms/etc/apcupsd.conf.in, platforms/mingw/apcupsd.conf.in, src/device.c, src/drivers/net/net.c, src/drivers/snmp/drv_powernet.c, src/lib/apcconfig.c: Add POLLTIME directive to control UPS polling interval. NETTIME is accepted as a synonym for compatibility with old config files. @ text @d1 3 a3 1 $NetBSD: patch-ai,v 1.4 2007/06/15 21:15:39 bouyer Exp $ @ 1.4 log @Use a more up-to-date config file as example Add rc.d keywords to the startup script both suggested by Bernd Ernesti. @ text @d1 1 a1 1 $NetBSD: $ d3 10 a12 9 --- platforms/netbsd/Makefile.in.orig 2007-06-15 22:58:26.000000000 +0200 +++ platforms/netbsd/Makefile.in 2007-06-15 22:59:03.000000000 +0200 @@@@ -21,47 +21,6 @@@@ # a previous version already existed. # install: - @@echo "NetBSD distribution installation" - $(INSTALL_PROGRAM) -m 744 apcupsd /etc/rc.apcupsd - @@-today="`date +%Y%m%d%H%M`"; \ d14 4 a17 6 - if [ $$? -eq 0 ]; then \ - echo "/etc/rc.shutdown already patched"; \ - else \ - echo "patching /etc/rc.shutdown"; \ - rm -f /etc/rc.shutdown.$$today; \ - cp -p /etc/rc.shutdown /etc/rc.shutdown.$$today; \ d19 1 a19 1 - echo "if [ -f @@PWRFAILDIR@@/powerfail ]; then # TAG_APCUPSD";\ d27 1 a27 1 - ) >> /etc/rc.shutdown; \ d30 4 a33 5 - if [ $$? -eq 0 ]; then \ - echo "/etc/rc.local already patched"; \ - else \ - rm -f /etc/rc.local.$$today; \ - cp -p /etc/rc.local /etc/rc.local.$$today; \ d38 1 a38 1 - ) >> /etc/rc.local; \ d42 1 a42 1 - echo "examine the @@sysconfdir@@/apcupsd.conf file to ensure"; \ d49 15 a63 2 uninstall: @@echo "NetBSD distribution uninstall" @ 1.4.38.1 log @Pullup ticket #3493 - requested by bouyer sysutils/apcupsd: build fix Revisions pulled up: - sysutils/apcupsd/Makefile 1.62 - sysutils/apcupsd/PLIST 1.13 - sysutils/apcupsd/distinfo 1.15 - sysutils/apcupsd/options.mk 1.3 - sysutils/apcupsd/patches/patch-aa deleted - sysutils/apcupsd/patches/patch-ae 1.7 - sysutils/apcupsd/patches/patch-af 1.7 - sysutils/apcupsd/patches/patch-ag 1.5 - sysutils/apcupsd/patches/patch-ai 1.5 - sysutils/apcupsd/patches/patch-aj 1.8 - sysutils/apcupsd/patches/patch-al 1.5 - sysutils/apcupsd/patches/patch-an 1.6 - sysutils/apcupsd/patches/patch-ao 1.7 --- Module Name: pkgsrc Committed By: bouyer Date: Mon Aug 1 14:54:51 UTC 2011 Modified Files: pkgsrc/sysutils/apcupsd: Makefile PLIST distinfo options.mk pkgsrc/sysutils/apcupsd/patches: patch-ae patch-af patch-ag patch-ai patch-aj patch-al patch-an patch-ao Removed Files: pkgsrc/sysutils/apcupsd/patches: patch-aa Log Message: Update to 3.14.9. Dragonfly users, please test that is still builds ! pkgsrc change: as snmp support doesn't depend on net-snmp anymore, remove snmp option and always build snmp support. cgi option now depend on graphics/gd/ User-visible changes sinces 3.14.3: 2010-08-30 14:18 adk0212 * src/drivers/snmplite/: mge-mib.cpp, mge-oids.h, mibs.cpp: Add support for MGE SNMP MIB. Contributed by Lars Täer 2010-07-30 18:04 adk0212 * src/drivers/snmplite/: apc-mib.cpp, apc-oids.h, mib.cpp, oids.h, rfc1628-mib.cpp, rfc1628-oids.h, snmplite.cpp, snmplite.h: Add support for RFC1628 SNMP MIB. Refactor APC MIB and create MibStrategy struct for associating MIB/CI mapping with corresponding processing function. RFC1628 strategy is coded per the MIB but untested. 2010-01-10 10:29 adk0212 * include/defines.h, src/apctest.c, src/drivers/usb/usb.c: Add apctest support for reading/setting self-test interval on USB. Also show current setting in UPS status. Contributed by James Belleau 2009-10-25 11:03 adk0212 * configure, autoconf/config.h.in, autoconf/configure.in, autoconf/variables.mak.in, include/struct.h, platforms/etc/apcupsd.conf.in, src/drivers/Makefile, src/drivers/drivers.c, src/drivers/snmplite/Makefile, src/drivers/snmplite/asn.cpp, src/drivers/snmplite/asn.h, src/drivers/snmplite/mib.cpp, src/drivers/snmplite/snmp.cpp, src/drivers/snmplite/snmp.h, src/drivers/snmplite/snmplite.cpp, src/drivers/snmplite/snmplite.h, src/lib/apcconfig.c, src/lib/apcstatus.c: Add SNMP Lite driver which does not depend on net-snmp library. This makes it more portable and eliminates need to move libsnmp.so to /lib in order to do a killpower on systems where /usr is unmounted. 2009-09-01 20:30 adk0212 * src/apctest.c: Implement battery calibration in apctest for USB models. Thanks to James Belleau for the original implementation which has been modified somewhat in this commit. 2009-05-02 10:30 adk0212 * src/action.c: Change log level of UPS self-test messages to WARNING from ALERT. Given that self-test messages are routine, they do not belong at LOG_ALERT. Contributed by Dave Ewart . 2009-04-25 10:58 adk0212 * src/lib/apcconfig.c: Remove EVENTFILE, EVENTFILEMAX config directives. These were replaced by the plural versions that are in use today (EVENTSFILE, EVENTSFILEMAX) almost 10 years ago. It's time to kill the old names. (h/t Trevor Roydhouse ) 2009-03-02 17:48 adk0212 * doc/apcupsd.man, include/drivers.h, include/extern.h, src/action.c, src/apctest.c, src/apcupsd.c, src/device.c, src/options.c, src/drivers/drivers.c, src/drivers/apcsmart/apcsmart.h, src/drivers/apcsmart/smart.c, src/drivers/apcsmart/smartoper.c, src/drivers/usb/usb.c, src/drivers/usb/usb.h, src/lib/apclock.c: Add support for turning the UPS off completely. This complements existing hibernate (aka killpower) functionality. Turn-off is implemented for apcsmart and USB drivers, subject to support for the relevant commands in the UPS itself. Contributed by Keith Campbell . 2008-06-29 11:12 adk0212 * src/action.c: Fix bug in LOWBATT glitch handling. We must examine LOWBATT for changes every time thru the status loop, not just during the OnBattery state. Otherwise we can miss the initial LOWBATT assertion, which defeats the glitch rejection logic. 2008-05-06 20:16 skoona * src/gapcmon/gapcmon.c: Corrected the use of NOMPOWER and the calc of current usage amount 2008-05-04 11:13 adk0212 * src/drivers/usb/usb.c: Add a heuristic to fix up incorrect NOMINV or NOMOUTV. Some UPSes (RS 500) report decivolts instead of volts. Reported by Kirill S. Bychkov . 2008-01-27 12:00 adk0212 * include/struct.h, platforms/etc/apcupsd.conf.in, platforms/mingw/apcupsd.conf.in, src/device.c, src/drivers/net/net.c, src/drivers/snmp/drv_powernet.c, src/lib/apcconfig.c: Add POLLTIME directive to control UPS polling interval. NETTIME is accepted as a synonym for compatibility with old config files. @ text @d1 1 a1 1 $NetBSD$ d3 9 a11 10 --- platforms/netbsd/Makefile.orig 2011-08-01 15:45:29.000000000 +0200 +++ platforms/netbsd/Makefile 2011-08-01 15:45:49.000000000 +0200 @@@@ -7,58 +7,5 @@@@ all-uninstall: uninstall-netbsd install-netbsd: - $(call DISTINST,NetBSD) - $(call MKDIR,/etc) - $(call INSTPROG,744,apcupsd,/etc/rc.apcupsd) - $(VV)-today="`date +%Y%m%d%H%M`"; \ d13 6 a18 4 - if [ $$? -ne 0 ]; then \ - echo " PATCH $(DESTDIR)/etc/rc.shutdown"; \ - rm -f $(DESTDIR)/etc/rc.shutdown.$$today; \ - cp -p /etc/rc.shutdown $(DESTDIR)/etc/rc.shutdown.$$today; \ d20 1 a20 1 - echo "if [ -f $(PWRFAILDIR)/powerfail ]; then # TAG_APCUPSD";\ d28 1 a28 1 - ) >> $(DESTDIR)/etc/rc.shutdown; \ d31 5 a35 4 - if [ $$? -ne 0 ]; then \ - echo " PATCH $(DESTDIR)/etc/rc.local"; \ - rm -f $(DESTDIR)/etc/rc.local.$$today; \ - cp -p /etc/rc.local $(DESTDIR)/etc/rc.local.$$today; \ d40 1 a40 1 - ) >> $(DESTDIR)/etc/rc.local; \ d44 1 a44 1 - echo "examine the $(sysconfdir)/apcupsd.conf file to ensure"; \ d51 2 a52 15 uninstall-netbsd: - $(call DISTUNINST,NetBSD) - -$(call UNINST,/etc/rc.apcupsd) - $(VV)-today="`date +%Y%m%d%H%M`"; \ - for f in $(DESTDIR)/etc/rc.local $(DESTDIR)/etc/rc.shutdown; do \ - grep -q '# TAG_APCUPSD' $$f; \ - if [ $$? -eq 0 ]; then \ - echo " PATCH $$f"; \ - rm -f $$f.$$today; \ - cp -p $$f $$f.$$today; \ - $(SED) -e '/TAG_APCUPSD/d;' \ - < $$f.$$today > $$f; \ - chmod 644 $$f; \ - fi; \ - done @ 1.3 log @Update to 3.8.5. Summary of changes since 3.6.2: . New network interface to publish to clients the UPS status . New master/server network code that is more fault tolerant . Internationalization . Use GNU getopt . Logging on syslog . Events logged in a file like APC's PowerChute . Sync code removed: now only async processes are used . Updated documentation (HTTP version) . Bug fixes and enhancements: too many to tell them all . no more powersc script, is has been remplaced with apccontrol . In master/slave configurations, all masters and slaves must be updated at the same time. Version 3.8.0 is not compatible with versions prior to 3.8.0-pre4. . Support for the Back-UPS Office series of UPSes . Fixed dumb UPSes working with the Custom Simple cable. . Correction of a buffer overflow on certain newer UPSes. . More fault tolerant on startup in master/slave configuration. . Additional STATUS variables (number of times on battery, amount of time on batteries, time/date of last transfer to batteries, apcupsd start time/date). . apctest program for testing serial ports. . Automatic notification of certain events by email. . Detects Self Test and reports it as such rather than a Power Failure. . For SmartUPSes, apcupsd does a much better job of adapting to the actual features of the UPS and is more efficient. . Add Battery Runtime Calibration to apctest . UPSNAME now sets upsname if given. Otherwise, apcupsd attempts to get name from UPS, if not found, uses hostname, finally "default". . Added Ambient Temperature and Humidity to multimon (Carl Erhorn) A number of the configuration statements have changed since versions 3.6.2. You should either take the new apcupsd.conf file and modify it, or update your existing file. In general, we recommend starting with the new file. If you have used a prior version of apcupsd, the CONTROL script file (/sbin/powersc) has now been replaced by $SYSCONFDIR/apcupsd/apccontrol. Consequently, the CONTROL configuration statement is obsolete. The following configuration statements have been replaced by scripts called from SYSCONDFIR/apcupsd/apccontrol, and thus are obsolete: BATTCMD, LIMITCMN, LOADCMD, PWRCMD, REBOOTCMD, REMOTECMD, RETCMD, and TIMECMD. If you use the master/slave networking code, please be aware that the @ text @d1 1 a1 1 $NetBSD: patch-ai,v 1.2 2000/08/05 07:31:21 jlam Exp $ d3 47 a49 3 --- apchttp.c.orig Mon Apr 26 14:16:43 1999 +++ apchttp.c Sat Aug 5 02:52:41 2000 @@@@ -70,7 +70,6 @@@@ d51 2 a52 14 #include #include -#include #include #include #include @@@@ -80,6 +79,7 @@@@ #include #include #include +#include #include #include @ 1.2 log @Update apcupsd to 3.6.2. Package provided by Greg Woods in pkg/10552. Changes from version 3.5.8: Network is fully functional under non-threaded compile. Possible fix for "pipe_master_status" calls on slaves. Added 940-1524C smart signal cable support. Added internationalization support. There is _only_ the support but no current code is written for the intl package. It can be compiled in, but intl strings have still to be translated (to be done in the future). Added new configuration options to reduce init time of daemon. powersc CONFIG powersc NAME powersc BATTERY Fixes a FIFO error @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD: $ d3 3 a5 5 --- installs/powersc.orig Tue Jul 20 18:58:51 1999 +++ installs/powersc Tue Jul 20 19:14:13 1999 @@@@ -4,25 +4,9 @@@@ POWERPID=/var/run/power.pid APCPID=/var/run/apcupsd.pid d7 11 a17 8 -if [ -x /sbin/shutdown ]; then SHUTDOWN=/sbin/shutdown -elif [ -x /sbin/shutdown.bsd ]; then - SHUTDOWN=/sbin/shutdown.bsd -else - echo Command shutdown or shutdown.bsd not found! - exit 1 -fi d19 2 a20 95 -if [ -x /usr/local/sbin/apcupsd ]; then - APCUPSD=/usr/local/sbin/apcupsd -elif [ -x /usr/sbin/apcupsd ]; then - APCUPSD=/usr/sbin/apcupsd -elif [ -x /sbin/apcupsd ]; then - APCUPSD=/sbin/apcupsd -else - echo Command apcupsd not found! - exit 1 -fi + APCUPSD=@@@@PREFIX@@@@/sbin/apcupsd if test "$(whoami)" != "root"; then printf "Sorry, you must be root to run this script." | wall @@@@ -32,42 +16,52 @@@@ case "$1" in POWEROUT) printf "Warning there are Power problems." | wall + /usr/bin/logger -p user.info -t apcupsd \ + "Warning there are Power problems." ;; ONBATTERY) printf "Power Failure running on UPS." | wall + /usr/bin/logger -p user.info -t apcupsd \ + "Power Failure running on UPS." ;; FAILING) printf "Battery Power Failed, Normal Shutdown.\n" | wall + /usr/bin/logger -p user.emerg -t apcupsd \ + "UPS Battery Power Failed, Normal Shutdown." ;; TIMEOUT) printf "Online Battery timeout, Normal Shutdown.\n" | wall + /usr/bin/logger -p user.emerg -t apcupsd \ + "UPS Online Battery timeout, Normal Shutdown." ;; LOADLIMIT) printf "Battery Load Limits Reached, Normal Shutdown.\n" | wall + /usr/bin/logger -p user.emerg -t apcupsd \ + "UPS Battery Load Limits Reached, Normal Shutdown." ;; RUNLIMIT) printf "Battery RunTime Limits Reached, Normal Shutdown.\n" | wall + /usr/bin/logger -p user.emerg -t apcupsd \ + "Battery RunTime Limits Reached, Normal Shutdown." ;; DOSHUTDOWN) printf "Beginning Shutdown Sequence!!!!!" | wall - ps x | gawk '{ if (($5 == "init") && ($1 == "1")) print $6 }' \ - | cut -f2 -d[ | cut -f1 -d] \ - > /tmp/run.level.power if [ -f $POWERPID ] then exit 0 else echo $$ > $POWERPID - $SHUTDOWN -h now + $SHUTDOWN -h now "UPS Powerfail" fi ;; MAINSBACK | WAITASEC) printf "Power has returned..." | wall + /usr/bin/logger -p user.info -t apcupsd \ + "Power has returned..." if [ -f $POWERPID ]; then printf "Attempting to cancel shutdown." kill $(cat $POWERPID) rm -f $POWERPID - init $(cat /tmp/run.level.power) fi ;; ANNOYME) @@@@ -75,14 +69,20 @@@@ ;; EMERGENCY) printf "Emergency Shutdown, Possible Battery Failure!!!!" | wall - $SHUTDOWN -h now + /usr/bin/logger -p user.emerg -t apcupsd \ + "Emergency Shutdown, Possible Battery Failure!!!!" + $SHUTDOWN -h now "Emergency Shutdown" ;; CHANGEME) printf "Emergency, Batteries Have Failed!!!!\nChange Them NOW!!!!" | wall + /usr/bin/logger -p user.emerg -t apcupsd \ + "Emergency, Batteries Have Failed!!!! Change Them NOW!!!!" ;; REMOTE) printf "Remote Calls, Normal Shutdown.\nBeginning Shutdown Sequence!!!!!" | wall - $SHUTDOWN -h now + /usr/bin/logger -p user.emerg -t apcupsd \ + "Remote Calls, Normal Shutdown" + $SHUTDOWN -h now "Remote Calls, Normal Shutdown" ;; KILL) sleep 1 $APCUPSD killpower @ 1.1.1.1 log @apcupsd, a daemon to manage and monitor APC UPSes. @ text @@