Desc: How to use the dummyups driver
File: dummyups.txt
Date: 08/17/2000
Auth: Bill Carlson <wcarlson@wkks.org>

The dummyups driver is mainly for testing purposes only. It can be used to 
appear as a UPS in the following states: On Line (OL), On Battery (OB) and Low
Battery (LB).

The driver is interactive, at startup you will be presented with a panel for
setting the current status of the driver. If you do not see this panel on
startup, this is a good indication you are missing Xdialog. :)

Requirements:

dummyups requires Xdialog (http://xdialog.free.fr/) for drawing the panel.


Installation:

dummyups is not built by default. Change to models/ in the source after you
have run ./configure and run "make dummyups". Move the resulting dummyups
where you wish.


Usage: dummyups [portname]

dummyups must run as root under X. It is NOT recommended to make dummyups
setuid root, doing so is at your own risk. See man xhost and man su for ways
to run something as root under X. Something like the following would probably
work:

xhost +myhost.name
su -c dummyups


The portname argument is tagged onto the end of the state filename, it
defaults to "null". Which means the state file would be called dummyups-null.

One could run several different dummyups drivers, to perhaps simulation
multiple power supplies on different UPSes, just give a different portname to
each one.


Sample UPS line from upsd.conf with dummyups on portname "biggy":

UPS bigdummy /var/state/ups/dummyups-biggy


Sample upsmon MONITOR line:

MONITOR bigdummy@localhost 2 duh master

Meaning monitor bigdummy at the localhost, bigdummy is keeping 2 power
supplies up, login in with the password "duh" and be master on the UPS.

Make sure you restart upsd and upsmon when making changes to their conf files!
