Arjen, I think one problem is that the APC does not implement an "ondelay" in any meaningful way. You can set UPS.PowerSummary.DelayBeforeStartup, but it will not have any effect unless the UPS is already offline. And the only time it's going to be offline is if the user turned it off with the power button, because setting PowerSummary.DelayBeforeShutdown will always turn it off (after the specified delay) and then turn it back on after a fixed short delay or after AC power returns (whichever is later).
The BelkinUNV is even worse: if you set the startup delay, then the UPS will *definitely* come back on after the specified delay, regardless of whether the power has actually returned or not. This is almost never what one wants, and definitely not what the upsdrv_shutdown() should do. Other UPSs behave yet differently. This was the reason to have device-specific shutdown routines. Also, in my opinion, a default offdelay of 20 seconds is useless. The default offdelay should be 0 seconds, because normally one shuts down the UPS as the last step in the computer's shutdown sequence. If someone wants to send the UPS into a shutdown countdown while they are still continuing to boot down, then this is pretty risky, and in any case, 20 seconds will almost certainly be too short. -- Peter Arjen de Korte wrote: > > Peter Selinger wrote: > > > I noticed a similar problem: on APC, the new shutdown method actually > > includes a delay of many seconds. Presumably the intende behavior was: > > shutdown immediately, and return to power after n seconds. > > No. The intended behavior is to use the 'ondelay' and 'offdelay' values > that are advertized. If you don't like the default values of 30 and 20 > seconds respectively (I have no idea why they are this large), override > them in 'ups.conf'. See 'man 8 usbhid-ups'. > > > The actual effect was the opposite: sit there for n seconds, then shut > > down and return immediately. > > See above for an explanation. > > > The previous, model-specific shutdown routines had the advantage that > > they actually did the correct thing for each model. > > Same here. Override the default values in 'ups.conf'. > > Best regards, Arjen > _______________________________________________ Nut-upsdev mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
