Citeren Raphaël <raphael.brou...@ve-hotech.com>:

When reading /etc/init.d/nut, i see that when restarting nut, script stop nut and start it again. When starting again the driver is one more time started without any verification that its already launched.

Stopping a driver is an asynchronous process. So you either have to check if the PID file is removed before assuming the driver has actually stopped or you need to wait a couple of seconds before (re)starting the drivers.

I think there is a problem in code there.

This is an inherent effect of the method that is used to signal drivers to stop. On systems with multiple driver instances, you don't want to hang around waiting for a driver to actually stop before going to the next one.

have you a solution to bypass this problem without rewriting /etc/init.d/nut

The easiest fix is to add a delay between

   stop nut
   sleep 2
   start nut

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