[Nut-upsuser] Nut-upsuser Digest, Vol 72, Issue 21

Arjen de Korte nut+users at de-korte.org
Fri Jun 24 14:25:14 UTC 2011


Citeren Raphaël <raphael.broutin op ve-hotech.com>:

> Testing PID before launching a new instance of driver is a good  
> solution but need to be implemented in /etc/init.d/nut

So, what's the big deal here? This is just a script on most (if not  
all systems) that can be modified easily. On the other had, changing  
the binaries is usually much more difficult.

> The sleep solution is incorrect because if i do in parallel twice  
> (stop,sleep,start). The two starts will be done at the same time ( i  
> mean stop will be already done) and there will be 2 instance of  
> driver.

Are you using 'upsdrvctl'? I fail to see the problem mentioned above,  
because 'upsdrvctl' will not start two drivers with identical names,  
so the problem can't occur (unless you're running 'upsdrvctl start'  
twice in a row).

> Or i dont understand.

Or I don't. Could you post your 'ups.conf' here? Are you trying to  
monitor two identical UPS devices?

> Testing PID before and launching new instance of driver if pid does  
> not exist) sould be the right solution but only if  2 UPS needs 1  
> driver else this solution fails

No, the name of the driver and UPS are in the PID filename, so we can  
easily check if that exists (in fact, the development version will do  
that). But this doesn't completely solve the problem, since this is  
prone to race conditions.

Best regards, Arjen
-- 
Please keep list traffic on the list (off-list replies will be rejected)





More information about the Nut-upsuser mailing list