Hi Folks,

I have a debian 'testing' system with /usr under lvm2 control and hit
this problem.  I've gotten killpower working with a slightly patched
apcupsd 3.14.3-2, as follows:

  $ apt-get source apcupsd
  $ sudo apt-get build-dep apcupsd
  $ cd apcupsd-3.14.3
  $ patch -p1 < ~/apcupsd-lvm.patch
  $ fakeroot debian/rules binary

Then install the .deb files produced for apcupsd and apcupsd-doc and
configure as normal.  The patch switches to linking against static
libnetsnmp, libcrypto, and libz.  It also removes a call to 'wall' during
apccontrol killpower (for some reason the echo before apcupsd --killpower
does not use wall but the call after it does, so I removed the extra call).

apcupsd-lvm.patch
------------------------------------------------------------------------------
diff --git a/configure b/configure
index 9983225..d49fedd 100755
--- a/configure
+++ b/configure
@@ -11972,7 +11972,7 @@ fi
 echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_EVP_DigestInit" >&5
 echo "${ECHO_T}$ac_cv_lib_crypto_EVP_DigestInit" >&6
 if test $ac_cv_lib_crypto_EVP_DigestInit = yes; then
-  echo '   including crypto library for snmp.'; DRVLIBS="$DRVLIBS -lcrypto"
+  echo '   including crypto library for snmp.'; DRVLIBS="$DRVLIBS -Wl,-Bstatic 
-lcrypto -lz -Wl,-Bdynamic"
 fi


@@ -12048,7 +12048,7 @@ fi
 echo "$as_me:$LINENO: result: $ac_cv_lib_netsnmp_snmp_open" >&5
 echo "${ECHO_T}$ac_cv_lib_netsnmp_snmp_open" >&6
 if test $ac_cv_lib_netsnmp_snmp_open = yes; then
-  DRVLIBS="$DRVLIBS -lnetsnmp"
+  DRVLIBS="-Wl,-Bstatic -lnetsnmp -Wl,-Bdynamic $DRVLIBS"
           SNMP_LIB_FOUND="yes"
 fi

diff --git a/platforms/apccontrol.in b/platforms/apccontrol.in
index cc2aae9..e8fa840 100644
--- a/platforms/apccontrol.in
+++ b/platforms/apccontrol.in
@@ -61,7 +61,7 @@ case "$1" in
        echo "Apccontrol doing: ${APCUPSD} --killpower on UPS ${2}"
        sleep 10
        ${APCUPSD} --killpower
-       echo "Apccontrol has done: ${APCUPSD} --killpower on UPS ${2}" | ${WALL}
+       echo "Apccontrol has done: ${APCUPSD} --killpower on UPS ${2}"
     ;;
     commfailure)
        echo "Warning communications lost with UPS ${2}" | ${WALL}
------------------------------------------------------------------------------

I hope this solution helps others.

-Brad




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to