[Nut-upsdev] Patch: upssched puts UPS name in the command line

Arjen de Korte nut+devel at de-korte.org
Tue Jun 22 13:54:01 UTC 2010

Citeren "Kiss Gabor (Bitman)" <kissg op ssg.ki.iif.hu>:

> The NOTIFYTYPE variable is also set to some misleading value. :-(

It will be set to whatever UPSNAME and NOTIFYTYPE that triggered the  
first timer that fired up the 'upssched' background process handling  
the timers.

> So I think yet introducing % tokens in the command line is not so bad idea.
> I mean %u would be substituted by UPS name, %n stands for notify type
> (including timer expiry), etc.

If knowing the UPSNAME is important for your timers, you should not be  
using '*' as upsname. Likewise, if the NOTIFYTYPE is important to kwow  
when the timer elapses, you should make this clear in the name of the  

This is obvious if you consider what the timers are supposed to do. If  
two or more UPSes (or events) start the same timer there will be  
ambiguity what needs to be done when a UPS (or event) needs to cancel  
a timer. Should it cancel all timers with the same name? Or only the  
ones with a matching UPSNAME? Which of these two makes sense, depends  
on the action performed by the timer.

Best regards, Arjen
Please keep list traffic on the list

More information about the Nut-upsdev mailing list