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

oss-list-ups at technorama.net oss-list-ups at technorama.net
Fri Jun 8 06:56:31 UTC 2007


Instead of modifying upsd why not ship a default ups.conf that contains 
a default driver named ['default' | 'automatic' | 'auto']?

USB and other devices that can be autodetected/started could use the 
default name included in ups.conf.

On Thu, Jun 07, 2007 at 09:11:09PM +0200, Arjen de Korte wrote:
> 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