Name: Automatic driver control
File: driver-control.txt
Date: 5 August 2001
Auth: Russell Kroll <rkroll@exploits.org>

Distributors, rejoice.  You no longer need to maintain configuration
information in two places.  By this I mean the existing scheme where you
have to list the driver(s) in startup scripts *and* in the upsd.conf.
Some distributions have tackled this by ripping the data out of upsd.conf.
You no longer need to do this.

upsdrvctl now offers a standard interface to all of the unified drivers.
As of this writing, that means bestups, fentonups and sec.  To start your
drivers, you edit the ups.conf to reflect the system's configuration, then
just run upsdrvctl:

	/path/to/upsdrvctl start

That's it.  upsdrvctl parses the .conf, and calls the individual drivers
with the new -a (autoconfig) option to get them running.

upsd now also suports using ups.conf for configuration data, and the older
support for "UPS blah /var/state/foo" lines in upsd.conf will eventually
be removed.  At that point, you will have to use ups.conf for all UPS
definitions.

The rub
-------

Nothing is ever simple.  The problem here is that the majority of the
drivers are not yet using the unified structure where main.c has control
and the actual driver.c is just a bunch of support functions. 

The old drivers do not support -a, so they can't be used with this system
yet.  It is imperative that we start converting them to make this work for
everyone.

Note: no patches will be accepted to hack -a support into old drivers.
Convert them.

At the time of this writing, these drivers have been converted or created
with this design:

	- apcsmart
	- belkin
	- bestups
	- everups
	- fentonups
	- hidups
	- sec

If you are using an old driver, you can still use ups.conf for the 
purposes of configuring upsd, but upsdrvctl will not work.
