SF.net SVN: gar:[24357] csw/mgar/pkg/apcupsd/trunk

lblume at users.sourceforge.net lblume at users.sourceforge.net
Sun Nov 16 23:32:20 CET 2014


Revision: 24357
          http://sourceforge.net/p/gar/code/24357
Author:   lblume
Date:     2014-11-16 22:32:17 +0000 (Sun, 16 Nov 2014)
Log Message:
-----------
apcupsd/trunk: apctst crashes when run with apcupsd running

Modified Paths:
--------------
    csw/mgar/pkg/apcupsd/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/apcupsd/trunk/files/0002-apctest.patch

Modified: csw/mgar/pkg/apcupsd/trunk/Makefile
===================================================================
--- csw/mgar/pkg/apcupsd/trunk/Makefile	2014-11-15 14:03:46 UTC (rev 24356)
+++ csw/mgar/pkg/apcupsd/trunk/Makefile	2014-11-16 22:32:17 UTC (rev 24357)
@@ -19,6 +19,7 @@
 BUILD_DEP_PKGS += CSWlibwrap-dev
 
 PATCHFILES += 0001-apccontrol-fix.patch
+PATCHFILES += 0002-apctest.patch
 
 PACKAGES += CSWapcupsd
 SPKG_DESC_CSWapcupsd = A daemon for controlling APC UPS

Added: csw/mgar/pkg/apcupsd/trunk/files/0002-apctest.patch
===================================================================
--- csw/mgar/pkg/apcupsd/trunk/files/0002-apctest.patch	                        (rev 0)
+++ csw/mgar/pkg/apcupsd/trunk/files/0002-apctest.patch	2014-11-16 22:32:17 UTC (rev 24357)
@@ -0,0 +1,18 @@
+Index: apcupsd-3.14.12-svn/src/apctest.c
+===================================================================
+--- apcupsd-3.14.12-svn/src/apctest.c	(revision 2267)
++++ apcupsd-3.14.12-svn/src/apctest.c	(working copy)
+@@ -336,7 +336,12 @@
+    }
+ 
+    pmsg("Setting up the port ...\n");
+-   setup_device(ups);
++   if (!setup_device(ups))
++   {
++      Error_abort0("Unable to open UPS device.\n"
++                  "  If apcupsd or apctest is already running,\n"
++                  "  please stop it and run this program again.\n");
++   }
+ 
+    if (hibernate_ups) {
+       pmsg("apctest: bad option, I cannot do a killpower\n");

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list