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

Kiss Gabor (Bitman) kissg at ssg.ki.iif.hu
Tue Jun 22 11:52:48 UTC 2010


> > > The patch in attachment allows upssched to put actual UPS name
> > The UPSNAME environment variable should be inherited by upssched from
> > upsmon, no?

Yes, I should _read_ (the manual) before _writing_. :-)

> Yes.
> 
> But please note that this does not work for the timers. These will use the
> environment from the first timer that was started (since only the first timer
> started will fork off a upssched process that handles the timers). Therefor,
> if knowing the UPSNAME is important to you when a timer elapses, using a '*'
> as <upsname> is probably not a good idea when starting them.

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

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.

Gabor




More information about the Nut-upsdev mailing list