pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/pkgsrc-2022Q3]: pkgsrc/sysutils/ups-nut Revert commit on wrong branch



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0a0d37d7b907
branches:  pkgsrc-2022Q3
changeset: 391289:0a0d37d7b907
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Sat Jan 07 16:09:38 2023 +0000

description:
Revert commit on wrong branch

diffstat:

 sysutils/ups-nut/Makefile           |   4 +-
 sysutils/ups-nut/files/ups.sh       |  20 ++++++++++-------
 sysutils/ups-nut/files/upsd.sh      |   8 ++++--
 sysutils/ups-nut/files/upsdriver.sh |  41 +++++++++++++++++++-----------------
 sysutils/ups-nut/files/upslog.sh    |  11 +++++----
 sysutils/ups-nut/files/upsmon.sh    |   9 ++++---
 6 files changed, 52 insertions(+), 41 deletions(-)

diffs (241 lines):

diff -r 3b083d07737d -r 0a0d37d7b907 sysutils/ups-nut/Makefile
--- a/sysutils/ups-nut/Makefile Sat Jan 07 16:07:58 2023 +0000
+++ b/sysutils/ups-nut/Makefile Sat Jan 07 16:09:38 2023 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.67.2.1 2023/01/07 16:07:58 gdt Exp $
+# $NetBSD: Makefile,v 1.67.2.2 2023/01/07 16:09:38 gdt Exp $
 
-PKGREVISION= 3
+PKGREVISION= 2
 .include "Makefile.common"
 
 PKGNAME=               ups-${DISTNAME}
diff -r 3b083d07737d -r 0a0d37d7b907 sysutils/ups-nut/files/ups.sh
--- a/sysutils/ups-nut/files/ups.sh     Sat Jan 07 16:07:58 2023 +0000
+++ b/sysutils/ups-nut/files/ups.sh     Sat Jan 07 16:09:38 2023 +0000
@@ -1,14 +1,11 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: ups.sh,v 1.10.158.1 2023/01/07 16:07:59 gdt Exp $
+# $NetBSD: ups.sh,v 1.10.158.2 2023/01/07 16:09:38 gdt Exp $
 #
 # KEYWORD: nostart
 
-# NB: This file is not intended to be run automaticlally at boot.  It
-# is a convenience script for humans to start or stop all 4 nut-ups
-# daemons as a group.
-
-if [ -f /etc/rc.subr ]; then
+if [ -f /etc/rc.subr ]
+then
        . /etc/rc.subr
 fi
 
@@ -18,6 +15,9 @@
 #
 forward_commands()
 {
+       # Backward compat with NetBSD <1.6:
+       [ -z "$rc_arg" ] && rc_arg=$_arg
+
        for file in $COMMAND_LIST; do
                $rcd_dir/$file $rc_arg
        done
@@ -25,6 +25,9 @@
 
 reverse_commands()
 {
+       # Backward compat with NetBSD <1.6:
+       [ -z "$rc_arg" ] && rc_arg=$_arg
+
        REVCOMMAND_LIST=
        for file in $COMMAND_LIST; do
                REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
@@ -42,10 +45,11 @@
 status_cmd="forward_commands"
 extra_commands="status"
 
-if [ -f /etc/rc.subr ]; then
+if [ -f /etc/rc.subr ]
+then
         run_rc_command "$1"
 else
         @ECHO@ -n " ${name}"
-       rc_arg="$1"
+       _arg="$1"
        ${start_cmd}
 fi
diff -r 3b083d07737d -r 0a0d37d7b907 sysutils/ups-nut/files/upsd.sh
--- a/sysutils/ups-nut/files/upsd.sh    Sat Jan 07 16:07:58 2023 +0000
+++ b/sysutils/ups-nut/files/upsd.sh    Sat Jan 07 16:09:38 2023 +0000
@@ -1,13 +1,14 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: upsd.sh,v 1.7.134.1 2023/01/07 16:07:59 gdt Exp $
+# $NetBSD: upsd.sh,v 1.7.134.2 2023/01/07 16:09:38 gdt Exp $
 #
 # PROVIDE: upsd
 # REQUIRE: upsdriver
 # BEFORE: upsmon
 # KEYWORD: shutdown
 
-if [ -f /etc/rc.subr ]; then
+if [ -f /etc/rc.subr ]
+then
        . /etc/rc.subr
 fi
 
@@ -17,7 +18,8 @@
 required_files="@NUT_CONFDIR@/${name}.conf"
 pidfile="@NUT_STATEDIR@/${name}.pid"
 
-if [ -f /etc/rc.subr ]; then
+if [ -f /etc/rc.subr ]
+then
        load_rc_config $name
        run_rc_command "$1"
 else
diff -r 3b083d07737d -r 0a0d37d7b907 sysutils/ups-nut/files/upsdriver.sh
--- a/sysutils/ups-nut/files/upsdriver.sh       Sat Jan 07 16:07:58 2023 +0000
+++ b/sysutils/ups-nut/files/upsdriver.sh       Sat Jan 07 16:09:38 2023 +0000
@@ -1,53 +1,56 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: upsdriver.sh,v 1.9.34.1 2023/01/07 16:07:59 gdt Exp $
+# $NetBSD: upsdriver.sh,v 1.9.34.2 2023/01/07 16:09:38 gdt Exp $
 #
 # PROVIDE: upsdriver
 # REQUIRE: NETWORK syslogd mountcritremote
 #
-# The standard approach is to leave "upsdriver_type" unset, so that
-# upsdrvctl is used to start and stop the driver(s).  (Note that a
-# system might have more than one UPS, and upsdrvctl should support
-# this.)  See nutupsdrv(8), but upsdrvctl will invoke the driver
-# properly.
-#
-# An alternative is to set the driver type and flags.  This only works
-# for a single driver.  This approach is deprecated and may be removed.
+# You will need to set some variables in /etc/rc.conf to start the UPS
+# driver(s) properly, e.g.
 #
 # upsdriver=YES
 #      upsdriver_type="newapc"
 #      upsdriver_flags="-a smartups"
+#
+# If "upsdriver_type" is unset, then use "upsdrvctl" to control the UPS
+# drivers.  Please refer to nutupsdrv(8) for more information about the
+# arguments to pass to the UPS drivers.
 
-if [ -f /etc/rc.subr ]; then
+if [ -f /etc/rc.subr ]
+then
        . /etc/rc.subr
 fi
 
 name="upsdriver"
 rcvar=$name
 
-if [ -f /etc/rc.subr ]; then
+if [ -f /etc/rc.subr ]
+then
        load_rc_config $name
 fi
 
-if [ "${upsdriver_type:-upsdrvctl}" = "upsdrvctl" ]; then
+if [ "${upsdriver_type:-upsdrvctl}" = "upsdrvctl" ]
+then
        ctl_command="@PREFIX@/sbin/upsdrvctl"
        required_files="@NUT_CONFDIR@/ups.conf"
        start_cmd="${ctl_command} start"
        stop_cmd="${ctl_command} stop"
-       # XXX implement status after upsdrvctl does
 else
        command="@PREFIX@/libexec/nut/${upsdriver_type}"
-       # XXX Restructure upsname into variable, but really just
-       # delete this option.
-       #upsname=`echo $upsdriver_flags | sed -e 's/^-a //'
-       #pidfile="@NUT_STATEDIR@/${upsdriver_type}-${upsname}.pid"
+       #
+       # XXX - We need a way to easily determine the pidfile, which is of
+       # XXX - the form @NUT_STATEDIR@/${updriver_type}-${tty}.pid
+       #
+       #pidfile="@NUT_STATEDIR@/${upsdriver_type}-${tty}.pid"
 fi
 
-if [ -f /etc/rc.subr ]; then
+if [ -f /etc/rc.subr ]
+then
        run_rc_command "$1"
 else
        @ECHO@ -n " ${name}"
-       if [ -n "${start_cmd}" ]; then
+       if [ -n "${start_cmd}" ]
+       then
                ${start_cmd}
        else
                ${command} ${upsdriver_flags} ${command_args}
diff -r 3b083d07737d -r 0a0d37d7b907 sysutils/ups-nut/files/upslog.sh
--- a/sysutils/ups-nut/files/upslog.sh  Sat Jan 07 16:07:58 2023 +0000
+++ b/sysutils/ups-nut/files/upslog.sh  Sat Jan 07 16:09:38 2023 +0000
@@ -1,10 +1,9 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: upslog.sh,v 1.6.154.1 2023/01/07 16:07:59 gdt Exp $
+# $NetBSD: upslog.sh,v 1.6.154.2 2023/01/07 16:09:38 gdt Exp $
 #
 # PROVIDE: upslog
-# REQUIRE: upsd DAEMON
-# BEFORE: LOGIN
+# REQUIRE: upsd
 #
 # You will need to set some variables in /etc/rc.conf to start upslog
 # properly, e.g.
@@ -15,7 +14,8 @@
 # Please refer to upslog(8) for more information about the arguments to pass
 # to upslog.
 
-if [ -f /etc/rc.subr ]; then
+if [ -f /etc/rc.subr ]
+then
        . /etc/rc.subr
 fi
 
@@ -24,7 +24,8 @@
 command="@PREFIX@/bin/${name}"
 pidfile="@NUT_STATEDIR@/${name}.pid"
 
-if [ -f /etc/rc.subr ]; then
+if [ -f /etc/rc.subr ]
+then
        load_rc_config $name
        run_rc_command "$1"
 else
diff -r 3b083d07737d -r 0a0d37d7b907 sysutils/ups-nut/files/upsmon.sh
--- a/sysutils/ups-nut/files/upsmon.sh  Sat Jan 07 16:07:58 2023 +0000
+++ b/sysutils/ups-nut/files/upsmon.sh  Sat Jan 07 16:09:38 2023 +0000
@@ -1,12 +1,12 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: upsmon.sh,v 1.7.134.1 2023/01/07 16:07:59 gdt Exp $
+# $NetBSD: upsmon.sh,v 1.7.134.2 2023/01/07 16:09:38 gdt Exp $
 #
 # PROVIDE: upsmon
-# BEFORE: SERVERS
 # KEYWORD: shutdown
 
-if [ -f /etc/rc.subr ]; then
+if [ -f /etc/rc.subr ]
+then
        . /etc/rc.subr
 fi
 
@@ -16,7 +16,8 @@
 pidfile="@NUT_STATEDIR@/${name}.pid"
 required_files="@NUT_CONFDIR@/${name}.conf"
 
-if [ -f /etc/rc.subr ]; then
+if [ -f /etc/rc.subr ]
+then
        load_rc_config $name
        run_rc_command "$1"
 else



Home | Main Index | Thread Index | Old Index