[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: APC UPS (Back-UPS Pro 650)



"Ralf G. R. Bergs" <rabe@RWTH-Aachen.DE> writes:
| On Tue, 21 Dec 1999 11:27:21 +0000 (/etc/localtime), Alberto Maurizi wrote:
|
| >	I'm getting more and more confused reading all the
| >	documentation (HOWTO etc ...) about cables, signals,
| >	and so on.
|
| So do I. Even worse: NONE of the ups daemons seem to work.
|
| We use the apcupsd to drive a SmartUPS 2200. Shutting the machine down DOES
| work, but the daemon doesn't shut down the UPS?!
|
| Hints anyone?!

By any chance is "/usr" a separate partition on your system, and not a
part of your "/" partition? Here's a note I sent to the apcupsd
mailing list some time ago. I'm just now updating my machines to
potato, and updating to the Debian apcupsd package, so I don't know
how applicable all this is to potato, but it's worth looking at

-------------Begin email to apcupsd mailing list--------------------
[snip]

A couple of other things I noticed that might be of interest. On my
Debian system I have the "/" and "/usr" directories on separate
partitions. This caused me some headaches trying to get things set up
right so that the halt script would power off my UPS. The reason is
that by the time the halt script gets to the line that sends the UPS
the poweroff signal the only partition mounted is "/".

First, I had to put all the apcupsd software in "/sbin" for obvious
reasons (well, obvious to everyone but me!:)

Next there's conditional at the start of the powersc script that looks
like:

  if test "$(whoami)" != "root"; then
        printf "Sorry, you must be root to run this script." | wall
        exit 1
  fi

When powersc is executed in the halt script this bombs on my Debian
system because "whoami" and "printf" are in /usr/bin, which was
unmounted earlier in the halt script. My solution was to remove that
conditional and "chmod 700 /sbin/powersc". I think that will
accomplish the same thing.

Lastly, powersc executes

	/sbin/apcupsd killpower

when powersc is executed from the halt script. Trouble is, when
apcupsd is compiled without modification to the Makefile, specifically
LDFLAGS, it depends on quite a few shared libraries which, on my
Debian system, are in /usr/lib. That spells trouble on any system on
which "/usr" isn't on the same partition as "/" and is thus unmounted
prior to the execution of "powersc KILL" in the halt script. My
solution was to add a "-static" to the LDFLAGS and all was well with
the world.

---------------End email to apcupsd mailing list----------------------

Hope that helps,
Gary


Reply to: