Sat Jan 7 16:09:38 2023 UTC ()
Revert commit on wrong branch


(gdt)
diff -r1.67.2.1 -r1.67.2.2 pkgsrc/sysutils/ups-nut/Makefile
diff -r1.10.158.1 -r1.10.158.2 pkgsrc/sysutils/ups-nut/files/ups.sh
diff -r1.7.134.1 -r1.7.134.2 pkgsrc/sysutils/ups-nut/files/upsd.sh
diff -r1.7.134.1 -r1.7.134.2 pkgsrc/sysutils/ups-nut/files/upsmon.sh
diff -r1.9.34.1 -r1.9.34.2 pkgsrc/sysutils/ups-nut/files/upsdriver.sh
diff -r1.6.154.1 -r1.6.154.2 pkgsrc/sysutils/ups-nut/files/upslog.sh

cvs diff -r1.67.2.1 -r1.67.2.2 pkgsrc/sysutils/ups-nut/Makefile (expand / switch to unified diff)

--- pkgsrc/sysutils/ups-nut/Makefile 2023/01/07 16:07:58 1.67.2.1
+++ pkgsrc/sysutils/ups-nut/Makefile 2023/01/07 16:09:38 1.67.2.2
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: Makefile,v 1.67.2.1 2023/01/07 16:07:58 gdt Exp $ 1# $NetBSD: Makefile,v 1.67.2.2 2023/01/07 16:09:38 gdt Exp $
2 2
3PKGREVISION= 3 3PKGREVISION= 2
4.include "Makefile.common" 4.include "Makefile.common"
5 5
6PKGNAME= ups-${DISTNAME} 6PKGNAME= ups-${DISTNAME}
7COMMENT= Network UPS Tools 7COMMENT= Network UPS Tools
8 8
9SUBST_CLASSES+= man-so 9SUBST_CLASSES+= man-so
10SUBST_MESSAGE.man-so= Fixing manpage .so references. 10SUBST_MESSAGE.man-so= Fixing manpage .so references.
11SUBST_STAGE.man-so= pre-build 11SUBST_STAGE.man-so= pre-build
12SUBST_FILES.man-so= docs/man/*.[0-9] 12SUBST_FILES.man-so= docs/man/*.[0-9]
13SUBST_SED.man-so= -e 's,^\.so \([^/]*\)\.\([0-9]\)$$,.so man\2/\1.\2,' 13SUBST_SED.man-so= -e 's,^\.so \([^/]*\)\.\([0-9]\)$$,.so man\2/\1.\2,'
14SUBST_NOOP_OK.man-so= yes 14SUBST_NOOP_OK.man-so= yes
15 15
16# Don't regenerate any files in tools/. 16# Don't regenerate any files in tools/.

cvs diff -r1.10.158.1 -r1.10.158.2 pkgsrc/sysutils/ups-nut/files/ups.sh (expand / switch to unified diff)

--- pkgsrc/sysutils/ups-nut/files/ups.sh 2023/01/07 16:07:59 1.10.158.1
+++ pkgsrc/sysutils/ups-nut/files/ups.sh 2023/01/07 16:09:38 1.10.158.2
@@ -1,51 +1,55 @@ @@ -1,51 +1,55 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: ups.sh,v 1.10.158.1 2023/01/07 16:07:59 gdt Exp $ 3# $NetBSD: ups.sh,v 1.10.158.2 2023/01/07 16:09:38 gdt Exp $
4# 4#
5# KEYWORD: nostart 5# KEYWORD: nostart
6 6
7# NB: This file is not intended to be run automaticlally at boot. It 7if [ -f /etc/rc.subr ]
8# is a convenience script for humans to start or stop all 4 nut-ups 8then
9# daemons as a group. 
10 
11if [ -f /etc/rc.subr ]; then 
12 . /etc/rc.subr 9 . /etc/rc.subr
13fi 10fi
14 11
15rcd_dir=`@DIRNAME@ $0` 12rcd_dir=`@DIRNAME@ $0`
16 13
17# NOTE: run_rc_command sets $rc_arg 14# NOTE: run_rc_command sets $rc_arg
18# 15#
19forward_commands() 16forward_commands()
20{ 17{
 18 # Backward compat with NetBSD <1.6:
 19 [ -z "$rc_arg" ] && rc_arg=$_arg
 20
21 for file in $COMMAND_LIST; do 21 for file in $COMMAND_LIST; do
22 $rcd_dir/$file $rc_arg 22 $rcd_dir/$file $rc_arg
23 done 23 done
24} 24}
25 25
26reverse_commands() 26reverse_commands()
27{ 27{
 28 # Backward compat with NetBSD <1.6:
 29 [ -z "$rc_arg" ] && rc_arg=$_arg
 30
28 REVCOMMAND_LIST= 31 REVCOMMAND_LIST=
29 for file in $COMMAND_LIST; do 32 for file in $COMMAND_LIST; do
30 REVCOMMAND_LIST="$file $REVCOMMAND_LIST" 33 REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
31 done 34 done
32 for file in $REVCOMMAND_LIST; do 35 for file in $REVCOMMAND_LIST; do
33 $rcd_dir/$file $rc_arg 36 $rcd_dir/$file $rc_arg
34 done 37 done
35} 38}
36 39
37COMMAND_LIST="upsdriver upsd upsmon upslog" 40COMMAND_LIST="upsdriver upsd upsmon upslog"
38 41
39name="ups" 42name="ups"
40start_cmd="forward_commands" 43start_cmd="forward_commands"
41stop_cmd="reverse_commands" 44stop_cmd="reverse_commands"
42status_cmd="forward_commands" 45status_cmd="forward_commands"
43extra_commands="status" 46extra_commands="status"
44 47
45if [ -f /etc/rc.subr ]; then 48if [ -f /etc/rc.subr ]
 49then
46 run_rc_command "$1" 50 run_rc_command "$1"
47else 51else
48 @ECHO@ -n " ${name}" 52 @ECHO@ -n " ${name}"
49 rc_arg="$1" 53 _arg="$1"
50 ${start_cmd} 54 ${start_cmd}
51fi 55fi

cvs diff -r1.7.134.1 -r1.7.134.2 pkgsrc/sysutils/ups-nut/files/upsd.sh (expand / switch to unified diff)

--- pkgsrc/sysutils/ups-nut/files/upsd.sh 2023/01/07 16:07:59 1.7.134.1
+++ pkgsrc/sysutils/ups-nut/files/upsd.sh 2023/01/07 16:09:38 1.7.134.2
@@ -1,26 +1,28 @@ @@ -1,26 +1,28 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: upsd.sh,v 1.7.134.1 2023/01/07 16:07:59 gdt Exp $ 3# $NetBSD: upsd.sh,v 1.7.134.2 2023/01/07 16:09:38 gdt Exp $
4# 4#
5# PROVIDE: upsd 5# PROVIDE: upsd
6# REQUIRE: upsdriver 6# REQUIRE: upsdriver
7# BEFORE: upsmon 7# BEFORE: upsmon
8# KEYWORD: shutdown 8# KEYWORD: shutdown
9 9
10if [ -f /etc/rc.subr ]; then 10if [ -f /etc/rc.subr ]
 11then
11 . /etc/rc.subr 12 . /etc/rc.subr
12fi 13fi
13 14
14name="upsd" 15name="upsd"
15rcvar=$name 16rcvar=$name
16command="@PREFIX@/sbin/${name}" 17command="@PREFIX@/sbin/${name}"
17required_files="@NUT_CONFDIR@/${name}.conf" 18required_files="@NUT_CONFDIR@/${name}.conf"
18pidfile="@NUT_STATEDIR@/${name}.pid" 19pidfile="@NUT_STATEDIR@/${name}.pid"
19 20
20if [ -f /etc/rc.subr ]; then 21if [ -f /etc/rc.subr ]
 22then
21 load_rc_config $name 23 load_rc_config $name
22 run_rc_command "$1" 24 run_rc_command "$1"
23else 25else
24 @ECHO@ -n " ${name}" 26 @ECHO@ -n " ${name}"
25 ${command} ${upsd_flags} ${command_args} 27 ${command} ${upsd_flags} ${command_args}
26fi 28fi

cvs diff -r1.7.134.1 -r1.7.134.2 pkgsrc/sysutils/ups-nut/files/upsmon.sh (expand / switch to unified diff)

--- pkgsrc/sysutils/ups-nut/files/upsmon.sh 2023/01/07 16:07:59 1.7.134.1
+++ pkgsrc/sysutils/ups-nut/files/upsmon.sh 2023/01/07 16:09:38 1.7.134.2
@@ -1,25 +1,26 @@ @@ -1,25 +1,26 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: upsmon.sh,v 1.7.134.1 2023/01/07 16:07:59 gdt Exp $ 3# $NetBSD: upsmon.sh,v 1.7.134.2 2023/01/07 16:09:38 gdt Exp $
4# 4#
5# PROVIDE: upsmon 5# PROVIDE: upsmon
6# BEFORE: SERVERS 
7# KEYWORD: shutdown 6# KEYWORD: shutdown
8 7
9if [ -f /etc/rc.subr ]; then 8if [ -f /etc/rc.subr ]
 9then
10 . /etc/rc.subr 10 . /etc/rc.subr
11fi 11fi
12 12
13name="upsmon" 13name="upsmon"
14rcvar="${name}" 14rcvar="${name}"
15command="@PREFIX@/sbin/${name}" 15command="@PREFIX@/sbin/${name}"
16pidfile="@NUT_STATEDIR@/${name}.pid" 16pidfile="@NUT_STATEDIR@/${name}.pid"
17required_files="@NUT_CONFDIR@/${name}.conf" 17required_files="@NUT_CONFDIR@/${name}.conf"
18 18
19if [ -f /etc/rc.subr ]; then 19if [ -f /etc/rc.subr ]
 20then
20 load_rc_config $name 21 load_rc_config $name
21 run_rc_command "$1" 22 run_rc_command "$1"
22else 23else
23 @ECHO@ -n " ${name}" 24 @ECHO@ -n " ${name}"
24 ${command} ${upsmon_flags} ${command_args} 25 ${command} ${upsmon_flags} ${command_args}
25fi 26fi

cvs diff -r1.9.34.1 -r1.9.34.2 pkgsrc/sysutils/ups-nut/files/upsdriver.sh (expand / switch to unified diff)

--- pkgsrc/sysutils/ups-nut/files/upsdriver.sh 2023/01/07 16:07:59 1.9.34.1
+++ pkgsrc/sysutils/ups-nut/files/upsdriver.sh 2023/01/07 16:09:38 1.9.34.2
@@ -1,55 +1,58 @@ @@ -1,55 +1,58 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: upsdriver.sh,v 1.9.34.1 2023/01/07 16:07:59 gdt Exp $ 3# $NetBSD: upsdriver.sh,v 1.9.34.2 2023/01/07 16:09:38 gdt Exp $
4# 4#
5# PROVIDE: upsdriver 5# PROVIDE: upsdriver
6# REQUIRE: NETWORK syslogd mountcritremote 6# REQUIRE: NETWORK syslogd mountcritremote
7# 7#
8# The standard approach is to leave "upsdriver_type" unset, so that 8# You will need to set some variables in /etc/rc.conf to start the UPS
9# upsdrvctl is used to start and stop the driver(s). (Note that a 9# driver(s) properly, e.g.
10# system might have more than one UPS, and upsdrvctl should support 
11# this.) See nutupsdrv(8), but upsdrvctl will invoke the driver 
12# properly. 
13# 
14# An alternative is to set the driver type and flags. This only works 
15# for a single driver. This approach is deprecated and may be removed. 
16# 10#
17# upsdriver=YES 11# upsdriver=YES
18# upsdriver_type="newapc" 12# upsdriver_type="newapc"
19# upsdriver_flags="-a smartups" 13# upsdriver_flags="-a smartups"
 14#
 15# If "upsdriver_type" is unset, then use "upsdrvctl" to control the UPS
 16# drivers. Please refer to nutupsdrv(8) for more information about the
 17# arguments to pass to the UPS drivers.
20 18
21if [ -f /etc/rc.subr ]; then 19if [ -f /etc/rc.subr ]
 20then
22 . /etc/rc.subr 21 . /etc/rc.subr
23fi 22fi
24 23
25name="upsdriver" 24name="upsdriver"
26rcvar=$name 25rcvar=$name
27 26
28if [ -f /etc/rc.subr ]; then 27if [ -f /etc/rc.subr ]
 28then
29 load_rc_config $name 29 load_rc_config $name
30fi 30fi
31 31
32if [ "${upsdriver_type:-upsdrvctl}" = "upsdrvctl" ]; then 32if [ "${upsdriver_type:-upsdrvctl}" = "upsdrvctl" ]
 33then
33 ctl_command="@PREFIX@/sbin/upsdrvctl" 34 ctl_command="@PREFIX@/sbin/upsdrvctl"
34 required_files="@NUT_CONFDIR@/ups.conf" 35 required_files="@NUT_CONFDIR@/ups.conf"
35 start_cmd="${ctl_command} start" 36 start_cmd="${ctl_command} start"
36 stop_cmd="${ctl_command} stop" 37 stop_cmd="${ctl_command} stop"
37 # XXX implement status after upsdrvctl does 
38else 38else
39 command="@PREFIX@/libexec/nut/${upsdriver_type}" 39 command="@PREFIX@/libexec/nut/${upsdriver_type}"
40 # XXX Restructure upsname into variable, but really just 40 #
41 # delete this option. 41 # XXX - We need a way to easily determine the pidfile, which is of
42 #upsname=`echo $upsdriver_flags | sed -e 's/^-a //' 42 # XXX - the form @NUT_STATEDIR@/${updriver_type}-${tty}.pid
43 #pidfile="@NUT_STATEDIR@/${upsdriver_type}-${upsname}.pid" 43 #
 44 #pidfile="@NUT_STATEDIR@/${upsdriver_type}-${tty}.pid"
44fi 45fi
45 46
46if [ -f /etc/rc.subr ]; then 47if [ -f /etc/rc.subr ]
 48then
47 run_rc_command "$1" 49 run_rc_command "$1"
48else 50else
49 @ECHO@ -n " ${name}" 51 @ECHO@ -n " ${name}"
50 if [ -n "${start_cmd}" ]; then 52 if [ -n "${start_cmd}" ]
 53 then
51 ${start_cmd} 54 ${start_cmd}
52 else 55 else
53 ${command} ${upsdriver_flags} ${command_args} 56 ${command} ${upsdriver_flags} ${command_args}
54 fi 57 fi
55fi 58fi

cvs diff -r1.6.154.1 -r1.6.154.2 pkgsrc/sysutils/ups-nut/files/upslog.sh (expand / switch to unified diff)

--- pkgsrc/sysutils/ups-nut/files/upslog.sh 2023/01/07 16:07:59 1.6.154.1
+++ pkgsrc/sysutils/ups-nut/files/upslog.sh 2023/01/07 16:09:38 1.6.154.2
@@ -1,33 +1,34 @@ @@ -1,33 +1,34 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: upslog.sh,v 1.6.154.1 2023/01/07 16:07:59 gdt Exp $ 3# $NetBSD: upslog.sh,v 1.6.154.2 2023/01/07 16:09:38 gdt Exp $
4# 4#
5# PROVIDE: upslog 5# PROVIDE: upslog
6# REQUIRE: upsd DAEMON 6# REQUIRE: upsd
7# BEFORE: LOGIN 
8# 7#
9# You will need to set some variables in /etc/rc.conf to start upslog 8# You will need to set some variables in /etc/rc.conf to start upslog
10# properly, e.g. 9# properly, e.g.
11# 10#
12# upslog=YES 11# upslog=YES
13# upslog_flags="smartups@localhost /var/log/ups 60" 12# upslog_flags="smartups@localhost /var/log/ups 60"
14# 13#
15# Please refer to upslog(8) for more information about the arguments to pass 14# Please refer to upslog(8) for more information about the arguments to pass
16# to upslog. 15# to upslog.
17 16
18if [ -f /etc/rc.subr ]; then 17if [ -f /etc/rc.subr ]
 18then
19 . /etc/rc.subr 19 . /etc/rc.subr
20fi 20fi
21 21
22name="upslog" 22name="upslog"
23rcvar="${name}" 23rcvar="${name}"
24command="@PREFIX@/bin/${name}" 24command="@PREFIX@/bin/${name}"
25pidfile="@NUT_STATEDIR@/${name}.pid" 25pidfile="@NUT_STATEDIR@/${name}.pid"
26 26
27if [ -f /etc/rc.subr ]; then 27if [ -f /etc/rc.subr ]
 28then
28 load_rc_config $name 29 load_rc_config $name
29 run_rc_command "$1" 30 run_rc_command "$1"
30else 31else
31 @ECHO@ -n " ${name}" 32 @ECHO@ -n " ${name}"
32 ${command} ${upslog_flags} ${command_args} 33 ${command} ${upslog_flags} ${command_args}
33fi 34fi