Citeren Raphaël <raphael.brou...@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)



_______________________________________________
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to