head 1.5; access; symbols pkgsrc-2026Q1:1.5.0.46 pkgsrc-2026Q1-base:1.5 pkgsrc-2025Q4:1.5.0.44 pkgsrc-2025Q4-base:1.5 pkgsrc-2025Q3:1.5.0.42 pkgsrc-2025Q3-base:1.5 pkgsrc-2025Q2:1.5.0.40 pkgsrc-2025Q2-base:1.5 pkgsrc-2025Q1:1.5.0.38 pkgsrc-2025Q1-base:1.5 pkgsrc-2024Q4:1.5.0.36 pkgsrc-2024Q4-base:1.5 pkgsrc-2024Q3:1.5.0.34 pkgsrc-2024Q3-base:1.5 pkgsrc-2024Q2:1.5.0.32 pkgsrc-2024Q2-base:1.5 pkgsrc-2024Q1:1.5.0.30 pkgsrc-2024Q1-base:1.5 pkgsrc-2023Q4:1.5.0.28 pkgsrc-2023Q4-base:1.5 pkgsrc-2023Q3:1.5.0.26 pkgsrc-2023Q3-base:1.5 pkgsrc-2023Q2:1.5.0.24 pkgsrc-2023Q2-base:1.5 pkgsrc-2023Q1:1.5.0.22 pkgsrc-2023Q1-base:1.5 pkgsrc-2022Q4:1.5.0.20 pkgsrc-2022Q4-base:1.5 pkgsrc-2022Q3:1.5.0.18 pkgsrc-2022Q3-base:1.5 pkgsrc-2022Q2:1.5.0.16 pkgsrc-2022Q2-base:1.5 pkgsrc-2022Q1:1.5.0.14 pkgsrc-2022Q1-base:1.5 pkgsrc-2021Q4:1.5.0.12 pkgsrc-2021Q4-base:1.5 pkgsrc-2021Q3:1.5.0.10 pkgsrc-2021Q3-base:1.5 pkgsrc-2021Q2:1.5.0.8 pkgsrc-2021Q2-base:1.5 pkgsrc-2021Q1:1.5.0.6 pkgsrc-2021Q1-base:1.5 pkgsrc-2020Q4:1.5.0.4 pkgsrc-2020Q4-base:1.5 pkgsrc-2020Q3:1.5.0.2 pkgsrc-2020Q3-base:1.5 pkgsrc-2020Q2:1.4.0.108 pkgsrc-2020Q2-base:1.4 pkgsrc-2020Q1:1.4.0.88 pkgsrc-2020Q1-base:1.4 pkgsrc-2019Q4:1.4.0.110 pkgsrc-2019Q4-base:1.4 pkgsrc-2019Q3:1.4.0.106 pkgsrc-2019Q3-base:1.4 pkgsrc-2019Q2:1.4.0.104 pkgsrc-2019Q2-base:1.4 pkgsrc-2019Q1:1.4.0.102 pkgsrc-2019Q1-base:1.4 pkgsrc-2018Q4:1.4.0.100 pkgsrc-2018Q4-base:1.4 pkgsrc-2018Q3:1.4.0.98 pkgsrc-2018Q3-base:1.4 pkgsrc-2018Q2:1.4.0.96 pkgsrc-2018Q2-base:1.4 pkgsrc-2018Q1:1.4.0.94 pkgsrc-2018Q1-base:1.4 pkgsrc-2017Q4:1.4.0.92 pkgsrc-2017Q4-base:1.4 pkgsrc-2017Q3:1.4.0.90 pkgsrc-2017Q3-base:1.4 pkgsrc-2017Q2:1.4.0.86 pkgsrc-2017Q2-base:1.4 pkgsrc-2017Q1:1.4.0.84 pkgsrc-2017Q1-base:1.4 pkgsrc-2016Q4:1.4.0.82 pkgsrc-2016Q4-base:1.4 pkgsrc-2016Q3:1.4.0.80 pkgsrc-2016Q3-base:1.4 pkgsrc-2016Q2:1.4.0.78 pkgsrc-2016Q2-base:1.4 pkgsrc-2016Q1:1.4.0.76 pkgsrc-2016Q1-base:1.4 pkgsrc-2015Q4:1.4.0.74 pkgsrc-2015Q4-base:1.4 pkgsrc-2015Q3:1.4.0.72 pkgsrc-2015Q3-base:1.4 pkgsrc-2015Q2:1.4.0.70 pkgsrc-2015Q2-base:1.4 pkgsrc-2015Q1:1.4.0.68 pkgsrc-2015Q1-base:1.4 pkgsrc-2014Q4:1.4.0.66 pkgsrc-2014Q4-base:1.4 pkgsrc-2014Q3:1.4.0.64 pkgsrc-2014Q3-base:1.4 pkgsrc-2014Q2:1.4.0.62 pkgsrc-2014Q2-base:1.4 pkgsrc-2014Q1:1.4.0.60 pkgsrc-2014Q1-base:1.4 pkgsrc-2013Q4:1.4.0.58 pkgsrc-2013Q4-base:1.4 pkgsrc-2013Q3:1.4.0.56 pkgsrc-2013Q3-base:1.4 pkgsrc-2013Q2:1.4.0.54 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.4.0.52 pkgsrc-2013Q1-base:1.4 pkgsrc-2012Q4:1.4.0.50 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.48 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.46 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.4.0.44 pkgsrc-2012Q1-base:1.4 pkgsrc-2011Q4:1.4.0.42 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q3:1.4.0.40 pkgsrc-2011Q3-base:1.4 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.5 date 2020.09.19.13.50.48; author taca; state Exp; branches; next 1.4; commitid 5Wq8qcCEfJ2taFoC; 1.4 date 2007.06.15.21.15.39; author bouyer; state Exp; branches; 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.20; 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.1.1.1 date 2000.01.21.19.16.00; author bouyer; state Exp; branches; next ; desc @@ 1.5 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$ Use standard NetBSD rc(8) scheme. --- platforms/netbsd/apcupsd.in.orig 2002-05-28 13:34:53.000000000 +0000 +++ platforms/netbsd/apcupsd.in @@@@ -1,49 +1,50 @@@@ -#! /bin/sh +#!/bin/sh # # apcupsd This shell script takes care of starting and stopping # the apcupsd UPS monitoring daemon. # -# chkconfig: 2345 20 99 -# description: apcupsd monitors power and takes action if necessary +# PROVIDE: apcupsd +# REQUIRE: DAEMON # -APCPID=@@PIDDIR@@/apcupsd.pid -APCLOCK=@@PIDDIR@@/apcupsd.lock DISTVER="@@DISTVER@@" -return=" Done." +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr +fi +name="apcupsd" +rcvar=$name +command="@@sbindir@@/${name}" +pidfile="@@PIDDIR@@/${name}.pid" +apclock="@@PIDDIR@@/${name}.lock" +command_args="--kill-on-powerfail" +extra_commands="info" -case "$1" in - start) - rm -f @@PWRFAILDIR@@/powerfail - rm -f @@nologdir@@/nologin - echo -n "Starting apcupsd power management" - @@sbindir@@/apcupsd --kill-on-powerfail || return=" Failed." - touch $APCLOCK - echo -e "$return" - ;; - stop) - echo -n "Stopping apcupsd power management" - if [ -f ${APCPID} ]; then - THEPID=`cat ${APCPID}` - kill ${THEPID} || return=" Failed." - rm -f ${APCPID} - else - return=" Failed." - fi - rm -f $APCLOCK - echo -e "$return" - ;; - restart) - $0 stop - $0 start - ;; - status) - @@sbindir@@/apcaccess status - ;; - *) - echo "Usage: $0 {start|stop|restart|status}" - exit 1 -esac +apcupsd_start_precmd() +{ + rm -f @@PWRFAILDIR@@/powerfail +} -exit 0 +apcupsd_start_postcmd() +{ + touch $apclock +} + +apcupsd_stop_postcmd() +{ + rm -f $apclock +} + +apcupsd_info() +{ + @@sbindir@@/apcaccess status +} + + +start_precmd=apcupsd_start_precmd +start_postcmd=apcupsd_start_postcmd +stop_postcmd=apcupsd_stop_postcmd +info_cmd=apcupsd_info + +load_rc_config $name +run_rc_command "$1" @ 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 5 --- platforms/netbsd/apcupsd.in.orig 2002-05-28 15:34:05.000000000 +0200 +++ platforms/netbsd/apcupsd.in 2007-01-05 20:52:42.000000000 +0100 @@@@ -6,6 +6,9 @@@@ # chkconfig: 2345 20 99 # description: apcupsd monitors power and takes action if necessary d14 2 d18 3 a20 3 +# APCPID=@@PIDDIR@@/apcupsd.pid APCLOCK=@@PIDDIR@@/apcupsd.lock d22 75 @ 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-ah,v 1.2 2000/08/05 07:31:20 jlam Exp $ d3 12 a14 16 --- apcupsd.c.orig Thu Jul 29 04:47:46 1999 +++ apcupsd.c Sat Aug 5 02:52:40 2000 @@@@ -292,13 +292,6 @@@@ * it should close them. *********************************************************************/ void terminate (int sig) { - /* - * XXX - Is someone able to explain me why here we find a sleep for 10 - * seconds ? - * - * -RF - */ - sleep(10); #ifdef NEW_THREADS restore_signals(); #endif /* NEW_THREADS */ @ 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 16 a18 73 --- docs/apcupsd.man8.orig Wed Apr 7 18:06:41 1999 +++ docs/apcupsd.man8 Tue Jul 20 19:27:28 1999 @@@@ -8,13 +8,13 @@@@ .SH NAME apcupsd \- daemon for Most APCC's UPS support under Linux and UNIX .SH SYNOPSIS -.B /sbin/apcupsd +.B @@@@PREFIX@@@@/sbin/apcupsd .br -.B /sbin/powersc +.B @@@@PREFIX@@@@/sbin/powersc .br .B /etc/apcupsd.conf .br -.B /sbin/apcaccess +.B @@@@PREFIX@@@@/bin/apcaccess .SH DESCRIPTION .LP This daemon can be used for controlling the APC SmartUPS. During a power @@@@ -23,7 +23,7 @@@@ about this fact. If power is not restored, a system shutdown will follow when the battery is exausted, a timeout (seconds) expires, or runtime minutes based on internal values based on power consumption rates. The -whole shutdown is now made by script calls to the "/sbin/powersc" +whole shutdown is now made by script calls to the "@@@@PREFIX@@@@/sbin/powersc" file called by "apcupsd", so no changes in the inittab are necessary. There is now no communication between "apcupsd" and init(1) process. .LP @@@@ -46,7 +46,7 @@@@ .SH CONFIGURATION It is necessary to write configuration info to the file "/etc/apcupsd.conf". This file is a plain ASCII file and you can use your favorite editor for -configuration. For simple configuration, see enclosed sample file. +configuration. For simple configuration, see sample file in @@@@PREFIX@@@@/etc .LP Configuration commands in .B /etc/apcupsd.conf @@@@ -54,7 +54,7 @@@@ .LP .B CONTROL -- -.B /sbin/powersc +.B @@@@PREFIX@@@@/sbin/powersc .br Name of control script called by "apcupsd". .LP @@@@ -123,7 +123,7 @@@@ -- .br Please specify which device is used for UPS communication. -The default is /dev/ttyS[0|1|2|3]. +The default is /dev/tty0[0|1|2|3]. .LP .B LOCKFILE -- @@@@ -165,7 +165,7 @@@@ --