[Nut-upsdev] Reserve '_' in driver names?

Arjen de Korte nut+devel at de-korte.org
Thu Jun 7 19:11:09 UTC 2007


I'm trying to see if we can make upsd autodetect the driver sockets from
the STATEPATH. This works quite well and uses surprisingly little code
(much less than parsing the 'ups.conf' file). However, since I can no
longer read the name from the 'ups.conf' file, I need to extract this
from the name of the socket. We might simply strip the drivername from
the socket name again, but I really don't want to do that, since it
won't allow us to define our own names (for autodetected UPSes) anymore.

Unfortunately, we're clean out of potential separation characters.
Unless I use a double '_' or '-' (the '.' is not an option), we're
stuck. Therefor I want to propose to reserve the '_' character in driver
names, so that this is available again for this purpose.

Currently, three drivers use a '_' in their names:

	bcmxcp_usb
	megatec_usb
	tripplite_usb

Since these are fairly recent additions (from the last two years), would
it be OK to rename them to

	bcmxcp-usb
	megatec-usb
	tripplite-usb

Or would this cause too much grief downstream? The alternative is to use
a double '_' as separator character, but personally, I thinks this looks
bug__ugly. :-)

Best regards, Arjen



More information about the Nut-upsdev mailing list