[Bug 381269] Re: NUT fails to shutdown UPS

Martin Maney maney at two14.net
Sun May 31 20:03:59 BST 2009

I've confirmed that this problem exists in Ibex, not that I really had
any doubts.  It's been reported to Debian as well, and the maintainer is
pondering the best way to repair this for Lenny. I got the impression
that this is still in the upstream codebase, so it is to be expected
that Jaunty and whatever the K one is are likewise afflicted.

Workaround: in /etc/init.d/nut:

    flag=`sed -ne 's#^ *POWERDOWNFLAG *\(.*\)$#\1#p' /etc/nut/upsmon.conf`
    wait_delay=`sed -ne 's#^ *POWEROFF_WAIT= *\(.*\)$#\1#p' /etc/default/nut`
    if [ -f "$flag" ] ; then
#     fixes bug: upsmon needs libupsclient in /usr/bin... oops
#      if /sbin/upsmon -K >/dev/null 2>&1 ; then
      if true ; then
        log_daemon_msg "Shutting down the UPS ..."

All that the call to upsmon adds is a check of the contents of
/etc/killpower - I guess someone once got an unexpected UPS shutdown
from having fiddled about unwisely, though I'm inclined to think that
anyone who can touch /etc/killpower can probably bollix things up in so
many other ways...  Anyway, all this costs is that double-check of the
flag file.

NUT fails to shutdown UPS
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to nut in ubuntu.

More information about the Ubuntu-server-bugs mailing list