[Nut-upsdev] Autodetecting running drivers by the 'upsd' server
Arjen de Korte
nut+devel at de-korte.org
Wed Jun 6 07:05:56 UTC 2007
Currently, the 'upsd' server uses 'ups.conf' to find out which drivers
should be running and uses this information to construct the socketname it
needs. This means that drivers that have not been configured in 'ups.conf'
can never be seen by the server. If we ever want to autodetect (by
whatever means) what drivers are started (udev?) and we start them
automatically, this probably means these drivers will not be configured in
'ups.conf' either and won't be seen.
What we could also do, is to let the server checkout the contents of the
STATEPATH and contact to all sockets it finds there. This would also do
away with the necessity to keep the socketnames in the drivers and the
server in sync. There are two caveats though:
1) Drivers must have created their socket before the server is started.
This is not different from what we have now, but the server wouldn't be
able to detect that a driver which should be running (according to
'ups.conf') is not available. Personally, I don't think this is not much
of a problem as long as 'upsdrvctl' complains about this (which it usually
does).
2) The STATEPATH should be dedicated for the driver, since the server
can't know in advance if a socket is for a NUT driver or some other
application that happens to be using the same directory for its sockets. I
don't think this is a big problem though.
Any thoughts on this?
Best regards, Arjen
--
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
More information about the Nut-upsdev
mailing list