pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/apcupsd Use a more up-to-date config file as ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e04c822513f3
branches: trunk
changeset: 530086:e04c822513f3
user: bouyer <bouyer%pkgsrc.org@localhost>
date: Fri Jun 15 21:15:38 2007 +0000
description:
Use a more up-to-date config file as example
Add rc.d keywords to the startup script
both suggested by Bernd Ernesti.
diffstat:
sysutils/apcupsd/Makefile | 15 +-
sysutils/apcupsd/PLIST | 5 +-
sysutils/apcupsd/distinfo | 7 +-
sysutils/apcupsd/patches/patch-ab | 356 ++-----------------------------------
sysutils/apcupsd/patches/patch-ah | 14 +
sysutils/apcupsd/patches/patch-ai | 52 +++++
sysutils/apcupsd/patches/patch-ak | 36 ---
7 files changed, 100 insertions(+), 385 deletions(-)
diffs (truncated from 569 to 300 lines):
diff -r bb68283a2407 -r e04c822513f3 sysutils/apcupsd/Makefile
--- a/sysutils/apcupsd/Makefile Fri Jun 15 21:08:41 2007 +0000
+++ b/sysutils/apcupsd/Makefile Fri Jun 15 21:15:38 2007 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.50 2007/06/15 19:05:56 bouyer Exp $
+# $NetBSD: Makefile,v 1.51 2007/06/15 21:15:38 bouyer Exp $
DISTNAME= apcupsd-3.14.1
+PKGREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=apcupsd/}
@@ -55,7 +56,7 @@
EGDIR= ${PREFIX}/share/examples/apcupsd
-CONF_FILES_PERMS+= ${EGDIR}/apcupsd.master.conf ${PKG_SYSCONFDIR}/apcupsd.conf ${ROOT_USER} ${ROOT_GROUP} 644
+CONF_FILES_PERMS+= ${EGDIR}/apcupsd.conf ${PKG_SYSCONFDIR}/apcupsd.conf ${ROOT_USER} ${ROOT_GROUP} 644
CONF_FILES_PERMS+= ${EGDIR}/changeme ${PKG_SYSCONFDIR}/changeme ${ROOT_USER} ${ROOT_GROUP} 755
CONF_FILES_PERMS+= ${EGDIR}/commfailure ${PKG_SYSCONFDIR}/commfailure ${ROOT_USER} ${ROOT_GROUP} 755
CONF_FILES_PERMS+= ${EGDIR}/commok ${PKG_SYSCONFDIR}/commok ${ROOT_USER} ${ROOT_GROUP} 755
@@ -84,12 +85,6 @@
# XXX we should probably allow the tty to be set in /etc/mk.conf too
#
post-build:
- ${SED} -e 's|@@PREFIX@@|${PREFIX}|' \
- ${WRKSRC}/examples/apcupsd.master.conf > \
- ${WRKDIR}/apcupsd.master.conf
- ${SED} -e 's|@@PREFIX@@|${PREFIX}|' \
- ${WRKSRC}/examples/apcupsd.slave.conf > \
- ${WRKDIR}/apcupsd.slave.conf
.for file in ${MANFILES}
${SED} -e 's|@@PREFIX@@|${PREFIX}|'\
-e 's|@@SYSCONFDIR@@|${PKG_SYSCONFDIR}|' \
@@ -101,9 +96,7 @@
publishsite support.html support.wml systems.html systems.wml template.inc
post-install:
- ${INSTALL_DATA} ${WRKDIR}/apcupsd.master.conf \
- ${PREFIX}/share/examples/apcupsd
- ${INSTALL_DATA} ${WRKDIR}/apcupsd.slave.conf \
+ ${INSTALL_DATA} ${WRKSRC}/platforms/etc/apcupsd.conf \
${PREFIX}/share/examples/apcupsd
.for file in ${EGFILES}
${INSTALL_SCRIPT} ${WRKSRC}/platforms/${file} \
diff -r bb68283a2407 -r e04c822513f3 sysutils/apcupsd/PLIST
--- a/sysutils/apcupsd/PLIST Fri Jun 15 21:08:41 2007 +0000
+++ b/sysutils/apcupsd/PLIST Fri Jun 15 21:15:38 2007 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.7 2007/06/15 19:05:56 bouyer Exp $
+@comment $NetBSD: PLIST,v 1.8 2007/06/15 21:15:39 bouyer Exp $
libexec/cgi-bin/upsstats.cgi
libexec/cgi-bin/upsfstats.cgi
libexec/cgi-bin/upsimage.cgi
@@ -27,8 +27,7 @@
share/doc/html/apcupsd/systems.wml
share/doc/html/apcupsd/template.inc
share/examples/apcupsd/apccontrol
-share/examples/apcupsd/apcupsd.master.conf
-share/examples/apcupsd/apcupsd.slave.conf
+share/examples/apcupsd/apcupsd.conf
share/examples/apcupsd/changeme
share/examples/apcupsd/commfailure
share/examples/apcupsd/commok
diff -r bb68283a2407 -r e04c822513f3 sysutils/apcupsd/distinfo
--- a/sysutils/apcupsd/distinfo Fri Jun 15 21:08:41 2007 +0000
+++ b/sysutils/apcupsd/distinfo Fri Jun 15 21:15:38 2007 +0000
@@ -1,16 +1,17 @@
-$NetBSD: distinfo,v 1.10 2007/06/15 19:05:56 bouyer Exp $
+$NetBSD: distinfo,v 1.11 2007/06/15 21:15:39 bouyer Exp $
SHA1 (apcupsd-3.14.1.tar.gz) = ee2a9ba074b688aba047d571098f44dc591e985c
RMD160 (apcupsd-3.14.1.tar.gz) = f6655123f7daa91966e9a2a4877e90b70babc670
Size (apcupsd-3.14.1.tar.gz) = 4352400 bytes
SHA1 (patch-aa) = 112c8db7a67456821a2e449d6a8ff600a7998dc0
-SHA1 (patch-ab) = b0976e7b98be56ff4e38b615db693729c834811f
+SHA1 (patch-ab) = 3db85accf1b05c8723dd7625278dfac02909dc34
SHA1 (patch-ac) = 98e8853dd030e09d5a487e57a277ff1269baa517
SHA1 (patch-ad) = 48818f95966f5c9f742e333614b0ab5387886e62
SHA1 (patch-ae) = 5e2ded84436b1da8b0eec6577065e0630ce00e78
SHA1 (patch-af) = c4a52226d83ac50adcd9296afd786b42867a7a6d
SHA1 (patch-ag) = 2b77e969d6cbe8ed06797cd753eb443bd6a3881b
+SHA1 (patch-ah) = 738b93b481310aa92ee16d0fbf91b5723b8cabb8
+SHA1 (patch-ai) = be802d4ea438ac991f7e0ebd1c086699aade0b2b
SHA1 (patch-aj) = cce8e25f52cc4eaa38eb31baffceb33fe4a43cee
-SHA1 (patch-ak) = c3069d2b8d9059b383874989cde2edaecd35d49b
SHA1 (patch-al) = a41cb4ee8d896fc633d8869f24e548fda0761340
SHA1 (patch-am) = a2c060519748cf95f0f9aaa284f783f086c1d7d4
diff -r bb68283a2407 -r e04c822513f3 sysutils/apcupsd/patches/patch-ab
--- a/sysutils/apcupsd/patches/patch-ab Fri Jun 15 21:08:41 2007 +0000
+++ b/sysutils/apcupsd/patches/patch-ab Fri Jun 15 21:15:38 2007 +0000
@@ -1,339 +1,31 @@
-$NetBSD: patch-ab,v 1.5 2007/06/15 19:05:56 bouyer Exp $
+$NetBSD: patch-ab,v 1.6 2007/06/15 21:15:39 bouyer Exp $
---- examples/apcupsd.master.conf.orig 2002-05-28 15:34:19.000000000 +0200
-+++ examples/apcupsd.master.conf 2007-06-15 17:12:48.000000000 +0200
-@@ -1,78 +1,120 @@
- ## apcupsd.conf v1.1 ##
--#
--# for apcupsd release 3.8.0
--#
--# "apcupsd" POSIX config file
--#
--# If you have used a prior version of apcupsd, the CONTROL script file
--# (/sbin/powersc) has now been replaced by /etc/apcupsd/apccontrol.
--# Consequently, the CONTROL configuration statement is obsolete.
--# The following configuration statements have been replaced by scripts
--# called from /etc/apcupsd/apccontrol, and thus are obsolete:
--# BATTCMD, LIMITCMN, LOADCMD, PWRCMD, REBOOTCMD, REMOTECMD, RETCMD,
--# and TIMECMD.
- #
-+# for apcupsd release 3.10.6 (10 October 2003) - freebsd
- #
-+# "apcupsd" POSIX config file
- #
- # ========= General configuration parameters ============
- #
-+# UPSNAME xxx
-+# Use this to give your UPS a name in log files and such. This
-+# is particulary useful if you have multiple UPSes. This does not
-+# set the EEPROM.
-+#UPSNAME
-+#
- # UPSCABLE [ simple | smart |
--# 940-00(20B,23A,24B,24C,24G,95A,95B,95C) |
-+# 940-00(20B,20C,23A,24B,24C,24G,95A,95B,95C) |
- # 940-15(24C) |
--# ether ]
-+# ether, usb ]
- # defines the type of cable that you have.
- UPSCABLE smart
- #
-+# Old types, still valid, are mapped to the new generic drives
-+# automatically
- # UPSTYPE [ backups | sharebasic | netups |
- # backupspro | smartvsups |
- # newbackupspro | backupspropnp |
- # smartups | matrixups | sharesmart ]
-+#
-+# *** NEW TYPES FOR GENERIC DRIVERS ***
-+# UPSTYPE [ dumb | apcsmart | net | usb | snmp | test]
- # defines the type of UPS you have.
- UPSTYPE smartups
- #
- #
- #DEVICE <string> /dev/<serial port>
--# name of your serial port
--DEVICE /dev/ttyS0
-+# name of your UPS device
-+#
-+# Here a table of the possible devices related with the UPS drivers.
-+#
-+# NOTE!!! for USB devices, please use a form indicated below
-+# including the [0-15] as written!
-+#
-+# Driver Device Description
-+# dumb /dev/tty** Serial character device
-+# apcsmart /dev/tty** Serial character device
-+# usb /dev/usb/hid/hiddev[0-15] If you follow our naming scheme
-+# usb /dev/usb/hiddev[0-15] On some systems
-+# net hostname:port Network link to a master apcupsd
-+# through NIS
-+# snmp hostname:port:vendor:community
-+# SNMP Network link to an SNMP-enabled
-+# UPS device. Vendor is the MIB used by
-+# the UPS device: can be "APC" or "RFC"
-+# where APC is the powernet MIB and RFC
-+# is the IETF's rfc1628 UPS-MIB.
-+# Port is usually 161.
-+DEVICE /dev/tty01
- #
- #LOCKFILE <path to lockfile>
- # path for serial port lock file
--LOCKFILE /var/lock
-+LOCKFILE /var/spool/lock
- #
- #
- #
- # ======== configuration parameters used during power failures ==========
- #
--# BATTERYLEVEL <percent of battery charge for shutdown> 10
-+# Note: BATTERYLEVEL, MINUTES, and TIMEOUT work in conjunction, so
-+# the first that occurs will cause the initation of a shutdown.
-+#
-+# If during a power failure, the remaining battery percentage
-+# (as reported by the UPS) is below or equal to BATTERYLEVEL,
-+# apcupsd will initiate a system shutdown.
- BATTERYLEVEL 5
- #
--# MINUTES <time in minutes of remaining battery runtime before shutdown> 5
-+#
-+# If during a power failure, the remaining runtime in minutes
-+# (as calculated internally by the UPS) is below or equal to MINUTES,
-+# apcupsd, will initiate a system shutdown.
- MINUTES 3
- #
--# TIMEOUT <time is seconds to run on UPS after a power failure>
-+#
-+# If during a power failure, the UPS has run on batteries for TIMEOUT
-+# many seconds or longer, apcupsd will initiate a system shutdown.
-+# A value of 0 disables this timer.
-+#
- # Note, if you have a Smart UPS, you will most likely want to disable
- # this timer by setting it to zero. That way, you UPS will continue
--# on batteries until either the % charge remaing drops below BATTERYLEVEL,
--# or the remaining battery runtime drops below MINUTES. Of course,
-+# on batteries until either the % charge remaing drops to or below BATTERYLEVEL,
-+# or the remaining battery runtime drops to or below MINUTES. Of course,
- # if you are testing, setting this to 60 causes a quick system shutdown
--# if you pull the power plug.
-+# if you pull the power plug.
- # If you have an older dumb UPS, you will want to set this to less than
- # the time you know you can run on batteries.
- TIMEOUT 0
--
- #
--# ANNOY <int> <30> <0> disables
-+#
- # Time in seconds between annoying users to signoff prior to
--# system shutdown.
-+# system shutdown. 0 disables.
- ANNOY 300
- #
--# ANNOYDELAY <int> <60> <0> disables delay before annoying user
-+# Initial delay after power failure before warning users to get
-+# off the system.
- ANNOYDELAY 60
- #
-+# The condition which determines when users are prevented from
-+# logging in during a power failure.
- # NOLOGON <string> [ disable | timeout | percent | minutes | always ]
- NOLOGON disable
- #
- #
-+# If killdelay is set, apcupsd will continue running after a
-+# shutdown has been requested, and after the specified time in
-+# seconds attempt to kill the power. This is for use on systems
-+# where apcupsd cannot regain control after a shutdown.
-+# KILLDELAY <seconds> 0 disables
-+KILLDELAY 0
-+#
- #
- # ==== Configuration statements the network information server =========
- #
-@@ -80,83 +122,149 @@
- # information server. If netstatus is on, a network information
- # server process will be started for serving the STATUS and
- # EVENT data over the network (used by CGI programs).
--NETSERVER on
-+NETSERVER off
- #
--# SERVERPORT <port> default is 7000
-+# NISIP <dotted notation ip address>
-+# IP address on which NIS server will listen for incoming connections.
-+# Default value is 0.0.0.0 that means any incoming request will be
-+# serviced but if you want it to listen to a single subnet you can
-+# set it up to that subnet address, for example 192.168.10.0
-+# Additionally you can listen for a single IP like 192.168.10.1
-+NISIP 0.0.0.0
-+#
-+# NISPORT <port> default is 3551 as registered with the IANA
+--- platforms/etc/apcupsd.conf.in.orig 2007-06-15 22:21:18.000000000 +0200
++++ platforms/etc/apcupsd.conf.in 2007-06-15 22:28:16.000000000 +0200
+@@ -180,7 +180,7 @@
+ # NIS will listen for connections only on that interface. Use the
+ # loopback address (127.0.0.1) to accept connections only from the
+ # local machine.
+-NISIP @NISIP@
++NISIP 127.0.0.1
+
+ # NISPORT <port> default is 3551 as registered with the IANA
# port to use for sending STATUS and EVENTS data over the network.
- # It is not used unless NETSERVER is on. If you change this port,
- # you will need to change the corresponding value in the cgi directory
- # and rebuild the cgi programs.
--SERVERPORT 7000
-+NISPORT 3551
- #
+@@ -191,7 +191,7 @@
+
# If you want the last few EVENTS to be available over the network
# by the network information server, you must define an EVENTSFILE.
--EVENTSFILE /etc/apcupsd/apcupsd.events
-+EVENTSFILE /var/log/apcupsd.events
- #
-+# EVENTSFILEMAX <kilobytes>
-+# By default, the size of the EVENTSFILE will be not be allowed to exceed
-+# 10 kilobytes. When the file grows beyond this limit, older EVENTS will
-+# be removed from the beginning of the file (first in first out). The
-+# parameter EVENTSFILEMAX can be set to a different kilobyte value, or set
-+# to zero to allow the EVENTSFILE to grow without limit.
-+EVENTSFILEMAX 10
- #
-+# ========== Configuration statements used if sharing =============
-+# a UPS and controlling it via the network
- #
-+# The configuration statements below are used if you
-+# want to share one UPS to power multiple machines and have them
-+# communicate by the network. Obviously, the master is connected
Home |
Main Index |
Thread Index |
Old Index