openbsd-ports/sysutils/nut/patches/patch-clients_upsstats_c
sthen 94f09986bc update to 2.4.1, code cleanup and adds support for a bunch of new
UPS and also now preliminary support for PDUs.

ok mbalmer (maintainer),
"commit and we fix in-tree if i run into issues" henning
2009-04-03 15:40:12 +00:00

22 lines
675 B
Plaintext

$OpenBSD: patch-clients_upsstats_c,v 1.7 2009/04/03 15:40:12 sthen Exp $
--- clients/upsstats.c.orig Tue Feb 17 09:20:43 2009
+++ clients/upsstats.c Wed Mar 18 21:27:43 2009
@@ -835,7 +835,7 @@ static void display_template(const char *tfn)
{
char fn[SMALLBUF], buf[LARGEBUF];
- snprintf(fn, sizeof(fn), "%s/%s", confpath(), tfn);
+ snprintf(fn, sizeof(fn), "%s/%s", cgiconfpath(), tfn);
tf = fopen(fn, "r");
@@ -955,7 +955,7 @@ static void load_hosts_conf(void)
char fn[SMALLBUF];
PCONF_CTX_t ctx;
- snprintf(fn, sizeof(fn), "%s/hosts.conf", CONFPATH);
+ snprintf(fn, sizeof(fn), "%s/hosts.conf", cgiconfpath());
pconf_init(&ctx, upsstats_hosts_err);