Aha. Not the best solution but it is at least one. Do you know by any chance 
the default login for an APC UPS? The one I found with google does not work:

keller:~ admin$ upsrw -u apc -p apc -s ups.delay.start="180" ups 
Unexpected response from upsd: ERR ACCESS-DENIED
keller:~ admin$ 

Cheers,
Wolfgang



Am 01.09.2011 um 04:32 schrieb Charles Lepple:

> On Aug 31, 2011, at 7:53 AM, Wolfgang Hottgenroth wrote:
> 
>> [ups.delay.shutdown]
>> Interval to wait after shutdown with delay command (seconds)
>> Type: ENUM
>> Option: "060" SELECTED
>> Option: "180"
>> Option: "300"
>> Option: "600"
>> 
>> [ups.delay.start]
>> Interval to wait before (re)starting the load (seconds)
>> Type: ENUM
>> Option: "000" SELECTED
>> Option: "060"
>> Option: "180"
>> Option: "300"
> 
> Given these two commands, you could probably cover most cases by writing a 
> script for the shutdown command which runs "upsdrvctl shutdown", then shuts 
> the Mac down in the 60 (or 180, 300 or 600) seconds before the UPS cuts power 
> to the Mac. It's not ideal, but I suspect most recent Macs will shut down in 
> 60 seconds or less.
> 
> The one potential race condition is if the power comes back on after the 
> delayed shutdown command, but before the UPS cuts power. The problem occurs 
> if the UPS doesn't cycle power anyway. The Mac would power down, but wouldn't 
> see a loss of AC, and would stay powered down.
> 
> Still haven't had a chance to see how OS X handles this, but they do seem to 
> have commands equivalent to NUT's ups.delay.shutdown:
> 
> http://developer.apple.com/library/mac/#documentation/Darwin/Reference/IOKit/IOPSKeys_h/index.html#//apple_ref/c/macro/kIOPSCommandDelayedRemovePowerKey


_______________________________________________
Nut-upsuser mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to