FreeBSD Bugzilla – Attachment 85063 Details for
Bug 121141
fix apcaccess functionality in sysutils/apcupsd package
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.78 KB, created by
Adrian Penisoara
on 2008-02-27 08:10:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Adrian Penisoara
Created:
2008-02-27 08:10:00 UTC
Size:
1.78 KB
patch
obsolete
>diff -ruN apcupsd.orig/Makefile apcupsd/Makefile >--- apcupsd.orig/Makefile 2007-10-21 13:39:38.000000000 +0300 >+++ apcupsd/Makefile 2008-02-27 09:39:19.659171480 +0200 >@@ -7,6 +7,7 @@ > > PORTNAME= apcupsd > PORTVERSION= 3.14.2 >+PORTREVISION= 1 > CATEGORIES= sysutils > MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:src_sf/g} \ > http://sce-tindy.tecnik93.com/FreeBSD/ports/${PORTNAME}/sources/:src_bk \ >diff -ruN apcupsd.orig/files/patch-aa apcupsd/files/patch-aa >--- apcupsd.orig/files/patch-aa 1970-01-01 02:00:00.000000000 +0200 >+++ apcupsd/files/patch-aa 2008-02-27 09:36:59.310547004 +0200 >@@ -0,0 +1,51 @@ >+--- src/apcaccess.c.orig 2007-08-03 18:17:38.000000000 +0300 >++++ src/apcaccess.c 2008-02-27 09:30:39.352400647 +0200 >+@@ -62,11 +62,19 @@ >+ int main(int argc, char **argv) >+ { >+ int mode = 0; >++ UPSINFO *ups = NULL; >++ >++ char *cfgfile = APCCONF; >++ struct stat cfgstat; >+ >+ #ifdef HAVE_MINGW >+ WSA_Init(); /* init MS networking */ >+ #endif >+ >++ ups = attach_ups(ups); >++ if (!ups) >++ Error_abort0(_("Cannot attach SYSV IPC.\n")); >++ >+ if (argc < 2) { >+ /* Assume user wants "status" */ >+ mode = 2; >+@@ -87,6 +95,20 @@ >+ *p++ = 0; >+ port = atoi(p); >+ } >++ } else { >++ /* check configuration so local NISIP and NISPORT variables can be used as >++ defaults */ >++ if (!stat(cfgfile, &cfgstat)) { >++ check_for_config(ups, cfgfile); >++ >++ if (ups) { >++ if (ups->nisip && ups->nisip[0]) >++ host = ups->nisip; >++ >++ if (ups->statusport) >++ port = ups->statusport; >++ } >++ } >+ } >+ >+ if (!*host || strcmp(host, "0.0.0.0") == 0) >+@@ -101,5 +123,7 @@ >+ Error_abort0(_("Strange mode\n")); >+ } >+ >++ detach_ups(ups); >++ >+ return 0; >+ }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 121141
: 85063