update to nut-2.0.3, last not leas bringing many format string fixes
preserve my changes to the fentonups driver, allowing the detection logic to be bypassed and a model to be forced - for UPSes that do implement the protocol except the identification command, which seems to be somewhat common the Xanto S3000R thing here behaves like that, and support for it is added ok mbalmer
This commit is contained in:
parent
0e8af14039
commit
2596ff8b6d
@ -1,14 +1,14 @@
|
||||
# $OpenBSD: Makefile,v 1.19 2006/04/27 19:46:24 mbalmer Exp $
|
||||
# $OpenBSD: Makefile,v 1.20 2006/05/03 17:32:09 henning Exp $
|
||||
|
||||
COMMENT= "UPS monitoring program supporting many brands"
|
||||
COMMENT-cgi= "CGIs for monitoring Nut-based UPSs"
|
||||
COMMENT-snmp= "driver for monitoring UPSs via SNMP"
|
||||
|
||||
VERSION= 2.0.0
|
||||
VERSION= 2.0.3
|
||||
DISTNAME= nut-${VERSION}
|
||||
PKGNAME= ${DISTNAME}p2
|
||||
PKGNAME-cgi= nut-cgi-${VERSION}p0
|
||||
PKGNAME-snmp= nut-snmp-${VERSION}p0
|
||||
PKGNAME= ${DISTNAME}
|
||||
PKGNAME-cgi= nut-cgi-${VERSION}
|
||||
PKGNAME-snmp= nut-snmp-${VERSION}
|
||||
CATEGORIES= sysutils
|
||||
HOMEPAGE= http://www.networkupstools.org/
|
||||
MAINTAINER= Marc Balmer <mbalmer@openbsd.org>
|
||||
|
@ -1,4 +1,4 @@
|
||||
MD5 (nut-2.0.0.tar.gz) = 84649ad95809737b5ffc19efdd9e9952
|
||||
RMD160 (nut-2.0.0.tar.gz) = 7f36296b61b79fe13d78c65a66aa034b60e1c0d2
|
||||
SHA1 (nut-2.0.0.tar.gz) = 5a89efac3047b6e8183224171be53251733d9927
|
||||
SIZE (nut-2.0.0.tar.gz) = 530492
|
||||
MD5 (nut-2.0.3.tar.gz) = ed2d3104d021a6ddb864f23d8cbd1cf6
|
||||
RMD160 (nut-2.0.3.tar.gz) = 890c52b1ab538101c30e5be33e785817a773cdb9
|
||||
SHA1 (nut-2.0.3.tar.gz) = 3ea064668846529d95663eadbf07b41ca8c25b1d
|
||||
SIZE (nut-2.0.3.tar.gz) = 656376
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-clients_Makefile_in,v 1.4 2004/09/27 03:10:24 marcm Exp $
|
||||
--- clients/Makefile.in.orig Tue Sep 2 13:25:54 2003
|
||||
+++ clients/Makefile.in Thu Sep 16 08:48:42 2004
|
||||
@@ -57,13 +57,13 @@ upslog: upslog.c $(UPSCLI_OBJ) $(LIBDEP)
|
||||
$OpenBSD: patch-clients_Makefile_in,v 1.5 2006/05/03 17:32:09 henning Exp $
|
||||
--- clients/Makefile.in.orig Wed May 4 11:36:36 2005
|
||||
+++ clients/Makefile.in Mon May 1 17:40:26 2006
|
||||
@@ -58,13 +58,13 @@ upslog: upslog.c $(UPSCLI_OBJ) $(LIBDEP)
|
||||
$(CC) $(NET_CFLAGS) -o upslog upslog.c $(UPSCLI_OBJ) $(LIBOBJ) $(NET_LDFLAGS)
|
||||
|
||||
upsstats.cgi: upsstats.c $(UPSCLI_OBJ) cgilib.o $(LIBDEP)
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-configure,v 1.6 2004/09/27 03:10:24 marcm Exp $
|
||||
--- configure.orig Mon Mar 8 01:45:45 2004
|
||||
+++ configure Thu Sep 16 08:48:43 2004
|
||||
@@ -4990,7 +4990,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||
$OpenBSD: patch-configure,v 1.7 2006/05/03 17:32:09 henning Exp $
|
||||
--- configure.orig Tue Feb 7 12:50:20 2006
|
||||
+++ configure Mon May 1 17:40:26 2006
|
||||
@@ -5368,7 +5368,7 @@ cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <openssl/ssl.h>
|
||||
int
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-drivers_fentonups_c,v 1.1 2006/04/27 19:46:24 mbalmer Exp $
|
||||
--- drivers/fentonups.c.orig Tue Apr 25 23:33:03 2006
|
||||
+++ drivers/fentonups.c Wed Apr 26 00:11:06 2006
|
||||
@@ -33,14 +33,17 @@ static float lowvolt = 0, voltrange;
|
||||
$OpenBSD: patch-drivers_fentonups_c,v 1.2 2006/05/03 17:32:09 henning Exp $
|
||||
--- drivers/fentonups.c.orig Thu May 26 14:22:27 2005
|
||||
+++ drivers/fentonups.c Mon May 1 18:16:55 2006
|
||||
@@ -34,14 +34,17 @@ static float lowvolt = 0, voltrange, chr
|
||||
static int lownorm, highnorm;
|
||||
|
||||
/* handle devices which don't give a properly formatted I string */
|
||||
@ -23,7 +23,7 @@ $OpenBSD: patch-drivers_fentonups_c,v 1.1 2006/04/27 19:46:24 mbalmer Exp $
|
||||
|
||||
for (i = 0; mtab2[i].id != NULL; i++) {
|
||||
if (!strcmp(cooked, mtab2[i].id)) {
|
||||
@@ -74,7 +77,7 @@ static void guessmodel(const char *raw)
|
||||
@@ -77,7 +80,7 @@ static void guessmodel(const char *raw)
|
||||
char mch, *mstr;
|
||||
|
||||
/* first see if it's in the mtab2 */
|
||||
@ -32,7 +32,7 @@ $OpenBSD: patch-drivers_fentonups_c,v 1.1 2006/04/27 19:46:24 mbalmer Exp $
|
||||
return;
|
||||
|
||||
mch = raw[17];
|
||||
@@ -175,28 +178,36 @@ static char *get_id(void)
|
||||
@@ -179,28 +182,36 @@ static char *get_id(void)
|
||||
void upsdrv_initinfo(void)
|
||||
{
|
||||
int modelnum, i, ret;
|
||||
@ -57,14 +57,14 @@ $OpenBSD: patch-drivers_fentonups_c,v 1.1 2006/04/27 19:46:24 mbalmer Exp $
|
||||
|
||||
- /* manufacturer */
|
||||
- rtrim(&temp[1], ' ');
|
||||
- dstate_setinfo("ups.mfr", &temp[1], 0, 0);
|
||||
- dstate_setinfo("ups.mfr", "%s", &temp[1]);
|
||||
+ temp[11] = 0;
|
||||
+ temp[27] = 0;
|
||||
|
||||
- /* L660A = PowerPal (L) @ 660 VA, American (A) version (115V) */
|
||||
+ /* manufacturer */
|
||||
+ rtrim(&temp[1], ' ');
|
||||
+ dstate_setinfo("ups.mfr", &temp[1], 0, 0);
|
||||
+ dstate_setinfo("ups.mfr", "%s", &temp[1]);
|
||||
|
||||
- /* grab full model string */
|
||||
- rtrim(&temp[17], ' ');
|
||||
@ -83,7 +83,7 @@ $OpenBSD: patch-drivers_fentonups_c,v 1.1 2006/04/27 19:46:24 mbalmer Exp $
|
||||
modelnum = -1;
|
||||
|
||||
/* figure out official model name and voltage info from table */
|
||||
@@ -210,20 +221,27 @@ void upsdrv_initinfo(void)
|
||||
@@ -216,20 +227,27 @@ void upsdrv_initinfo(void)
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ $OpenBSD: patch-drivers_fentonups_c,v 1.1 2006/04/27 19:46:24 mbalmer Exp $
|
||||
}
|
||||
|
||||
/* now add instant command support info */
|
||||
@@ -231,7 +249,8 @@ void upsdrv_initinfo(void)
|
||||
@@ -237,7 +255,8 @@ void upsdrv_initinfo(void)
|
||||
dstate_addcmd("test.battery.stop");
|
||||
|
||||
printf("Detected %s on %s\n", dstate_getinfo("ups.model"), device_path);
|
||||
@ -132,10 +132,10 @@ $OpenBSD: patch-drivers_fentonups_c,v 1.1 2006/04/27 19:46:24 mbalmer Exp $
|
||||
|
||||
/* paranoia - cancel any shutdown that might already be running */
|
||||
ret = ser_send(upsfd, "C\r");
|
||||
@@ -406,6 +425,7 @@ void upsdrv_help(void)
|
||||
|
||||
@@ -426,6 +445,7 @@ void upsdrv_help(void)
|
||||
void upsdrv_makevartable(void)
|
||||
{
|
||||
addvar(VAR_VALUE, "lowbattvolt", "Set low battery level, in volts");
|
||||
+ addvar(VAR_VALUE, "model", "force model");
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
$OpenBSD: patch-drivers_fentonups_h,v 1.1 2006/04/27 19:46:24 mbalmer Exp $
|
||||
--- drivers/fentonups.h.orig Tue Apr 25 23:32:16 2006
|
||||
+++ drivers/fentonups.h Wed Apr 26 00:09:19 2006
|
||||
@@ -81,5 +81,6 @@ struct {
|
||||
{ "WELI 500 1.0", "Giant Power", "MT650", 10.6, 3.7, 170, 180, 270, 280, 0 },
|
||||
{ "SMART-UPS 1800VA T18Q16AG", "Effekta", "MT 2000 RM",
|
||||
50.0, 19.5, 171, 200, 260, 278, 1 },
|
||||
+ { "XS3000R", "Online", "Xanto S3000R", 1.81, 0.44, 165, 200, 240, 275, 1 },
|
||||
$OpenBSD: patch-drivers_fentonups_h,v 1.2 2006/05/03 17:32:09 henning Exp $
|
||||
--- drivers/fentonups.h.orig Wed Jul 20 12:45:41 2005
|
||||
+++ drivers/fentonups.h Mon May 1 17:44:54 2006
|
||||
@@ -106,5 +106,8 @@ struct {
|
||||
{ "UNITEK Alph1000iS A0", "Unitek", "Alpha 1000is",
|
||||
9.6, 2.4, 9.6, 2.4, 158, 172, 288, 290, 0 },
|
||||
|
||||
+ { "XS3000R", "Online", "Xanto S3000R",
|
||||
+ 1.81, 0.44, 1.81, 0.44, 165, 200, 240, 275, 1 },
|
||||
+
|
||||
{ NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0 }
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-include_common_h,v 1.2 2004/09/27 03:10:24 marcm Exp $
|
||||
--- include/common.h.orig Tue Nov 25 18:07:02 2003
|
||||
+++ include/common.h Thu Sep 16 08:48:43 2004
|
||||
@@ -72,6 +72,9 @@ void syslogbit_set(void);
|
||||
$OpenBSD: patch-include_common_h,v 1.3 2006/05/03 17:32:09 henning Exp $
|
||||
--- include/common.h.orig Thu Jan 27 15:33:18 2005
|
||||
+++ include/common.h Mon May 1 17:40:26 2006
|
||||
@@ -74,6 +74,9 @@ void syslogbit_set(void);
|
||||
/* Return the default path for the directory containing configuration files */
|
||||
const char * confpath(void);
|
||||
|
||||
|
@ -1,36 +1,44 @@
|
||||
@comment $OpenBSD: PLIST,v 1.10 2005/10/24 05:14:13 fgsch Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.11 2006/05/03 17:32:09 henning Exp $
|
||||
@conflict upsd-*
|
||||
@pkgpath sysutils/nut,no_cgi
|
||||
@pkgpath sysutils/nut,snmp
|
||||
@pkgpath sysutils/nut,no_cgi,snmp
|
||||
@newuser ${NUT_USER}:${NUT_ID}:::UPS User:/var/empty:/sbin/nologin
|
||||
bin/apcsmart
|
||||
bin/bcmxcp
|
||||
bin/belkin
|
||||
bin/belkinunv
|
||||
bin/bestfcom
|
||||
bin/bestuferrups
|
||||
bin/bestups
|
||||
bin/blazer
|
||||
bin/cpsups
|
||||
bin/cyberpower
|
||||
bin/cyberpower1100
|
||||
bin/esupssmart
|
||||
bin/etapro
|
||||
bin/everups
|
||||
bin/fentonups
|
||||
bin/gamatronic
|
||||
bin/genericups
|
||||
bin/ippon
|
||||
bin/isbmex
|
||||
bin/liebert
|
||||
bin/masterguard
|
||||
bin/metasys
|
||||
bin/mge-shut
|
||||
bin/mge-utalk
|
||||
bin/mustek
|
||||
bin/oneac
|
||||
bin/powercom
|
||||
bin/powermust
|
||||
bin/safenet
|
||||
bin/sms
|
||||
bin/solis
|
||||
bin/tripplite
|
||||
bin/tripplitesu
|
||||
bin/upsc
|
||||
bin/upscmd
|
||||
bin/upscode2
|
||||
bin/upsdrvctl
|
||||
bin/upslog
|
||||
bin/upsrw
|
||||
@ -44,32 +52,39 @@ bin/victronups
|
||||
@man man/man5/upsset.conf.5
|
||||
@man man/man5/upsstats.html.5
|
||||
@man man/man8/apcsmart.8
|
||||
@man man/man8/bcmxcp.8
|
||||
@man man/man8/belkin.8
|
||||
@man man/man8/belkinunv.8
|
||||
@man man/man8/bestfcom.8
|
||||
@man man/man8/bestuferrups.8
|
||||
@man man/man8/bestups.8
|
||||
@man man/man8/cpsups.8
|
||||
@man man/man8/cyberpower.8
|
||||
@man man/man8/cyberpower1100.8
|
||||
@man man/man8/etapro.8
|
||||
@man man/man8/everups.8
|
||||
@man man/man8/fentonups.8
|
||||
@man man/man8/gamatronic.8
|
||||
@man man/man8/genericups.8
|
||||
@man man/man8/ippon.8
|
||||
@man man/man8/isbmex.8
|
||||
@man man/man8/liebert.8
|
||||
@man man/man8/masterguard.8
|
||||
@man man/man8/metasys.8
|
||||
@man man/man8/mge-shut.8
|
||||
@man man/man8/mge-utalk.8
|
||||
@man man/man8/mustek.8
|
||||
@man man/man8/nutupsdrv.8
|
||||
@man man/man8/oneac.8
|
||||
@man man/man8/powercom.8
|
||||
@man man/man8/powermust.8
|
||||
@man man/man8/safenet.8
|
||||
@man man/man8/sms.8
|
||||
@man man/man8/snmp-ups.8
|
||||
@man man/man8/solis.8
|
||||
@man man/man8/tripplite.8
|
||||
@man man/man8/tripplitesu.8
|
||||
@man man/man8/upsc.8
|
||||
@man man/man8/upscmd.8
|
||||
@man man/man8/upscode2.8
|
||||
@man man/man8/upsd.8
|
||||
@man man/man8/upsdrvctl.8
|
||||
@man man/man8/upsimage.cgi.8
|
||||
@ -88,6 +103,7 @@ share/doc/nut/FAQ
|
||||
share/doc/nut/README
|
||||
share/doc/nut/big-servers.txt
|
||||
share/doc/nut/cables/
|
||||
share/doc/nut/cables/apc-rs500-serial.txt
|
||||
share/doc/nut/cables/apc.txt
|
||||
share/doc/nut/cables/ge-imv-victron.txt
|
||||
share/doc/nut/cables/imv.txt
|
||||
@ -103,6 +119,7 @@ share/doc/nut/contact-closure.txt
|
||||
share/doc/nut/data-room.txt
|
||||
share/doc/nut/design.txt
|
||||
share/doc/nut/developers.txt
|
||||
share/doc/nut/hid-subdrivers.txt
|
||||
share/doc/nut/ideas.txt
|
||||
share/doc/nut/new-drivers.txt
|
||||
share/doc/nut/new-names.txt
|
||||
|
Loading…
Reference in New Issue
Block a user