[Nut-upsdev] Important regression in usbhid-ups (r1113)

Arjen de Korte nut+devel at de-korte.org
Fri Feb 22 07:22:21 UTC 2008


Peter Selinger wrote:

> What you describe would take the form something like the following:
> 
>         if (test -f /etc/killpower)
>         then
>                 echo "Scheduling power supply to shut off in 20 seconds"
>                 /usr/local/ups/bin/upsdrvctl shutdown
> 	fi
> 	
> 	echo "Killing the power, bye!"
> 	/sbin/halt
> 
> But this method has its own drawbacks: if the UPS in fact fails to power
> off, then the system will not reboot without human (and physical!)
> intervention. This kind of thing has happened to me often - during
> testing, and more importantly, after upgrading.  Perhaps a missing USB
> bus, /usr/local not mounted, a driver has been renamed in a new NUT
> version and upsdrvctl refuses to recognize its configuration file, or any
> such similar problem. It's amazing how often I have actually used the
> "you probably want to reboot here" scenario.

You're absolutely right. I'm not proposing to remove that statement from
the INSTALL file, because if there is a risk that the UPS fails to power
off (many, if not all, contact closure types UPS when on mains), this
might be the only way to prevent the system waiting for a power-cycle
that never comes. In that case, waiting 20 seconds before powering off
is pointless indeed.

Either you risk some hardware degradation or hanging around at the end
of your halt script. Choose your poison. The point from the discussion
(I think it was somewhere in a Debian mailinglist) was that this should
be an explicit choice of the user and that we should not package NUT to
use either of these.

Best regards, Arjen



More information about the Nut-upsdev mailing list