Revert commit on wrong branch
This commit is contained in:
parent
7e987120ec
commit
a906daa419
|
@ -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}
|
||||
|
|
|
@ -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 @@ rcd_dir=`@DIRNAME@ $0`
|
|||
#
|
||||
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 @@ forward_commands()
|
|||
|
||||
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 @@ stop_cmd="reverse_commands"
|
|||
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
|
||||
|
|
|
@ -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 @@ command="@PREFIX@/sbin/${name}"
|
|||
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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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 @@ rcvar="${name}"
|
|||
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
|
||||
|
|
|
@ -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 @@ command="@PREFIX@/sbin/${name}"
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue