Stephen Harris wrote:
On Tue, Nov 06, 2012 at 04:56:20PM -0500, m.roth@5-cent.us wrote:
Anyone else around using apcupsd? I seem to be seeing a problem, and I'd
Yes
like someone to check me on it: I edit /etc/apcupsd/apccontrol to replace the value of SHUTDOWN from /sbin/shutdown to /bin/false (we don't want 3 or 6 servers shutting down over a 2 second or so blip, which it really wants to do).
It wouldn't normally do that, until the battery is almost drained.
I dunno, but it appears to, sometimes. And we have such *wonderful* power in this building, there's at least one major blip, for a second or two, every night.... <snip>
it, I found that the config file was set to the original code... and I
apccontrol isn't flagged as a config file in the rpm
......... /etc/apcupsd/apccontrol ......... c /etc/apcupsd/apcupsd.conf ......... c /etc/apcupsd/changeme ......... c /etc/apcupsd/commfailure ......... c /etc/apcupsd/commok ......... c /etc/apcupsd/offbattery ......... c /etc/apcupsd/onbattery ......... c /etc/logrotate.d/apcupsd
Has anyone seen this behavior?
The script says
# WARNING: the apccontrol file will be overwritten every time you update your # apcupsd, doing `make install'. Your own customized scripts will _not_ be # overwritten. If you wish to make changes to this file (discouraged), you # should change apccontrol.sh.in and then rerun the configure process.
If you can't change apcupsd.conf config to meet your needs then _don't_ change apccontrol; add a custom script that does an "exit 99" to prevent the shutdown from running.
It looks like you're right... EXCEPT that you missed the part about changing apccontrol.sh.in, which appears to me to be something you get if you build apcusd, rather than just install it via yum. And there's no other obvious way to deal with not wanting to shut it down if you have multiple machines, and don't want to ever have it tell everybody to shut down.
Suggestions on what I can do *other* than build the package myself? I dunno, the times I see it shut down have *not* shut down for 3 or 5 min, nor do I think that was the max left runtime.
mark