Imported Upstream version 2.6.0
5
AUTHORS
|
@ -96,11 +96,6 @@ N: Lars Balker Rasmussen
|
||||||
E: lbr@mjolner.dk
|
E: lbr@mjolner.dk
|
||||||
D: Solaris and minor patches
|
D: Solaris and minor patches
|
||||||
|
|
||||||
N: Carlos Rodrigues
|
|
||||||
E: carlos.efr@mail.telepac.pt
|
|
||||||
W: http://students.fct.unl.pt/~cer09566/
|
|
||||||
D: author of the "megatec" driver
|
|
||||||
|
|
||||||
N: David Santinoli
|
N: David Santinoli
|
||||||
E: david@santinoli.com
|
E: david@santinoli.com
|
||||||
W: http://www.santinoli.com
|
W: http://www.santinoli.com
|
||||||
|
|
638
INSTALL
|
@ -1,522 +1,320 @@
|
||||||
Network UPS Tools: INSTALL
|
Installation instructions
|
||||||
|
=========================
|
||||||
|
|
||||||
These are the essential steps for compiling and installing this
|
This chapter describe the various methods for installing Network UPS Tools.
|
||||||
software, including configuring safe shutdowns when the UPS battery
|
|
||||||
runs out of power.
|
|
||||||
|
|
||||||
There are many programs and other features in this package. You should
|
Whenever it is possible, prefer <<Installing_packages, installing from packages>>.
|
||||||
check out the README file and other accompanying documentation to see
|
Packagers have done an excellent and hard work at improving NUT integration into
|
||||||
how it all works.
|
their system.
|
||||||
|
|
||||||
The paths shown below are the default values you get by just calling
|
[[Installing_source]]
|
||||||
configure by itself. If you have used --prefix or similar, things will
|
Installing from source
|
||||||
be different. Also, if you didn't install this program from source
|
----------------------
|
||||||
yourself, the paths will probably have a number of differences.
|
|
||||||
|
|
||||||
Note: by default, your system probably won't find the man pages, since
|
These are the essential steps for compiling and installing this software.
|
||||||
they install to /usr/local/ups/man. You can fix this by editing your
|
|
||||||
MANPATH, or just do this:
|
The NUT linkdoc:packager-guide[Packager Guide], which presents the best
|
||||||
|
practices for installing and integrating NUT, is also a good reading.
|
||||||
|
|
||||||
|
[NOTE]
|
||||||
|
.Keep in mind that...
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
- the paths shown below are the default values you get by just calling
|
||||||
|
configure by itself. If you have used --prefix or similar, things will be
|
||||||
|
different. Also, if you didn't install this program from source yourself, the
|
||||||
|
paths will probably have a number of differences.
|
||||||
|
|
||||||
|
- by default, your system probably won't find the man pages, since they
|
||||||
|
install to /usr/local/ups/man. You can fix this by editing your MANPATH, or
|
||||||
|
just do this:
|
||||||
|
|
||||||
man -M /usr/local/ups/man <man page>
|
man -M /usr/local/ups/man <man page>
|
||||||
|
|
||||||
man -M /usr/local/ups/man upsd.conf
|
- if your favorite system offers up to date binary packages, you should always
|
||||||
|
prefer these over a source installation. Along with the known advantages of such
|
||||||
|
systems for installation, upgrade and removal, there are many integration issues
|
||||||
|
that have been addressed.
|
||||||
|
|
||||||
Also, if your favorite system offers up to date binary packages,
|
================================================================================
|
||||||
always prefer these over a source installation. Along with the known
|
|
||||||
advantages of such systems for installation, upgrade and removal, there
|
|
||||||
are many integration issues that have been addressed.
|
|
||||||
|
|
||||||
============================================================================
|
|
||||||
============================================================================
|
|
||||||
============================================================================
|
|
||||||
|
|
||||||
Prepare your system
|
|
||||||
===================
|
|
||||||
|
|
||||||
1. Create at least one user and a group for running this software. You
|
|
||||||
might call them "ups" and "nut". The exact names aren't important as
|
|
||||||
long as you are consistent.
|
|
||||||
|
|
||||||
The process for doing this varies from one system to the next, and
|
|
||||||
explaining how to add users is beyond the scope of this document.
|
|
||||||
|
|
||||||
For the purposes of this document, the user name and group name
|
|
||||||
will be "ups" and "nut" respectively.
|
|
||||||
|
|
||||||
Be sure the new user is a member of the new group! If you forget to
|
|
||||||
do this, you will have problems later on when you try to start upsd.
|
|
||||||
|
|
||||||
============================================================================
|
|
||||||
============================================================================
|
|
||||||
============================================================================
|
|
||||||
|
|
||||||
Build and install
|
|
||||||
=================
|
|
||||||
|
|
||||||
|
|
||||||
1. Configure the source tree for your system. Add the --with-user and
|
Prepare your system
|
||||||
--with-group switch to set the user name and group that you created
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
above.
|
|
||||||
|
System User creation
|
||||||
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Create at least one system user and a group for running this software. You
|
||||||
|
might call them "ups" and "nut". The exact names aren't important as
|
||||||
|
long as you are consistent.
|
||||||
|
|
||||||
|
The process for doing this varies from one system to the next, and
|
||||||
|
explaining how to add users is beyond the scope of this document.
|
||||||
|
|
||||||
|
For the purposes of this document, the user name and group name
|
||||||
|
will be 'ups' and 'nut' respectively.
|
||||||
|
|
||||||
|
Be sure the new user is a member of the new group! If you forget to
|
||||||
|
do this, you will have problems later on when you try to start upsd.
|
||||||
|
|
||||||
|
|
||||||
|
Build and install
|
||||||
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
[[Configuration]]
|
||||||
|
Configuration
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Configure the source tree for your system. Add the '--with-user' and
|
||||||
|
'--with-group' switch to set the user name and group that you created
|
||||||
|
above.
|
||||||
|
|
||||||
./configure --with-user=ups --with-group=nut
|
./configure --with-user=ups --with-group=nut
|
||||||
|
|
||||||
If you need any other switches for configure, add them here. For
|
If you need any other switches for configure, add them here. For example:
|
||||||
example:
|
|
||||||
|
|
||||||
* to build and install USB drivers, add --with-usb (note that you
|
* to build and install USB drivers, add '--with-usb' (note that you
|
||||||
need to install libusb development package or files).
|
need to install libusb development package or files).
|
||||||
|
|
||||||
* to build and install SNMP drivers, add --with-snmp (note that
|
* to build and install SNMP drivers, add '--with-snmp' (note that
|
||||||
you need to install libsnmp development package or files).
|
you need to install libsnmp development package or files).
|
||||||
|
|
||||||
* to build and install CGI scripts, add --with-cgi.
|
* to build and install CGI scripts, add '--with-cgi'.
|
||||||
|
|
||||||
* to build and install NUT development files (needed to compile
|
See <<Configure_options,Configure options>> from the User Manual,
|
||||||
WMNut and MGE PSP), add --with-lib.
|
docs/configure.txt or './configure --help' for all the available
|
||||||
|
options.
|
||||||
|
|
||||||
* to build and install HAL support, add --with-hal.
|
If you alter paths with additional switches, be sure to use those
|
||||||
|
new paths while reading the rest of the steps.
|
||||||
|
|
||||||
See docs/configure.txt or "./configure --help" for the available
|
Reference: <<Configure_options,Configure options>> from the
|
||||||
options.
|
User Manual.
|
||||||
|
|
||||||
If you alter paths with additional switches, be sure to use those
|
|
||||||
new paths while reading the rest of the steps.
|
|
||||||
|
|
||||||
*** Reference: docs/configure.txt
|
Build the programs
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
2. Build the programs.
|
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
||||||
This will build the NUT client and server programs and the
|
This will build the NUT client and server programs and the
|
||||||
selected drivers. It will also build any other features that were
|
selected drivers. It will also build any other features that were
|
||||||
selected during configuration in step 1. above.
|
selected during <<Configuration,configuration>> step above.
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
3. Gain privileges for installing software if necessary.
|
Installation
|
||||||
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
|
[NOTE]
|
||||||
|
=====================================================================
|
||||||
|
|
||||||
|
you should now gain privileges for installing software if necessary:
|
||||||
|
|
||||||
su
|
su
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
=====================================================================
|
||||||
|
|
||||||
|
Install the files to a system level directory:
|
||||||
4. Install the files to a system level directory.
|
|
||||||
|
|
||||||
make install
|
make install
|
||||||
|
|
||||||
This will install the compiled programs and man pages, as well as
|
This will install the compiled programs and man pages, as well as
|
||||||
some data files required by NUT. Any optional features selected
|
some data files required by NUT. Any optional features selected
|
||||||
during configuration will also be installed.
|
during configuration will also be installed.
|
||||||
|
|
||||||
This will also install sample versions of the NUT configuration
|
This will also install sample versions of the NUT configuration
|
||||||
files. Sample files are installed with names like ups.conf.sample
|
files. Sample files are installed with names like ups.conf.sample
|
||||||
so they will not overwrite any existing real config files you may
|
so they will not overwrite any existing real config files you may
|
||||||
have created.
|
have created.
|
||||||
|
|
||||||
If you are packaging this software, then you will probably want to
|
If you are packaging this software, then you will probably want to
|
||||||
use the DESTDIR variable to redirect the build into another place,
|
use the DESTDIR variable to redirect the build into another place,
|
||||||
i.e.:
|
i.e.:
|
||||||
|
|
||||||
make DESTDIR=/tmp/package install
|
make DESTDIR=/tmp/package install
|
||||||
make DESTDIR=/tmp/package install-conf
|
make DESTDIR=/tmp/package install-conf
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
[[StatePath]]
|
||||||
|
State path creation
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
5. Create the state path directory for the driver(s) and server to use
|
Create the state path directory for the driver(s) and server to use
|
||||||
for storing UPS status data and other auxiliary files, and make it
|
for storing UPS status data and other auxiliary files, and make it
|
||||||
owned by the user you created.
|
owned by the user you created.
|
||||||
|
|
||||||
mkdir -p /var/state/ups
|
mkdir -p /var/state/ups
|
||||||
chmod 0770 /var/state/ups
|
chmod 0770 /var/state/ups
|
||||||
chown root:nut /var/state/ups
|
chown root:nut /var/state/ups
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
[[Ownership]]
|
||||||
|
Ownership and permissions
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
6. Set ownership data and permissions on your serial or USB ports
|
Set ownership data and permissions on your serial or USB ports
|
||||||
that go to your UPS hardware. Be sure to limit access to just
|
that go to your UPS hardware. Be sure to limit access to just
|
||||||
the user you created earlier.
|
the user you created earlier.
|
||||||
|
|
||||||
These examples assume the second serial port (ttyS1) on a typical
|
These examples assume the second serial port (ttyS1) on a typical
|
||||||
Slackware system. On FreeBSD, that would be cuaa1. Serial ports
|
Slackware system. On FreeBSD, that would be cuaa1. Serial ports
|
||||||
vary greatly, so yours may be called something else.
|
vary greatly, so yours may be called something else.
|
||||||
|
|
||||||
chmod 0660 /dev/ttyS1
|
chmod 0660 /dev/ttyS1
|
||||||
chown root:nut /dev/ttyS1
|
chown root:nut /dev/ttyS1
|
||||||
|
|
||||||
The setup for USB ports is slightly more complicated. Device files
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
for USB devices, such as /proc/bus/usb/002/001, are usually
|
FIXME: TBR
|
||||||
created "on the fly" when a device is plugged in, and disappear
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
when the device is disconnected. Moreover, the names of these
|
|
||||||
device files can change randomly. To set up the correct
|
|
||||||
permissions for the USB device, you may need to set up (operating
|
|
||||||
system dependent) hotplugging scripts. Sample scripts and
|
|
||||||
information are provided in the scripts/hotplug and
|
|
||||||
scripts/udev directories. For most users, the hotplugging scripts
|
|
||||||
will be installed automatically by "make install".
|
|
||||||
|
|
||||||
(If you want to try if a driver works without setting up
|
The setup for USB ports is slightly more complicated. Device files
|
||||||
hotplugging, you can add the "-u root" option to upsd, upsmon, and
|
for USB devices, such as /proc/bus/usb/002/001, are usually
|
||||||
drivers; this should allow you to follow the below
|
created "on the fly" when a device is plugged in, and disappear
|
||||||
instructions. However, don't forget to set up the correct
|
when the device is disconnected. Moreover, the names of these
|
||||||
permissions later!).
|
device files can change randomly. To set up the correct
|
||||||
|
permissions for the USB device, you may need to set up (operating
|
||||||
|
system dependent) hotplugging scripts. Sample scripts and
|
||||||
|
information are provided in the scripts/hotplug and
|
||||||
|
scripts/udev directories. For most users, the hotplugging scripts
|
||||||
|
will be installed automatically by "make install".
|
||||||
|
|
||||||
NOTE: if you are using something like devfs or udev, make sure
|
(If you want to try if a driver works without setting up
|
||||||
these permissions stay set across a reboot. If they revert to the
|
hotplugging, you can add the "-u root" option to upsd, upsmon, and
|
||||||
old values, your drivers may fail to start.
|
drivers; this should allow you to follow the below
|
||||||
|
instructions. However, don't forget to set up the correct
|
||||||
|
permissions later!).
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
NOTE: if you are using something like devfs or udev, make sure
|
||||||
|
these permissions stay set across a reboot. If they revert to the
|
||||||
|
old values, your drivers may fail to start.
|
||||||
|
|
||||||
7. Create one section per UPS in /usr/local/ups/etc/ups.conf
|
|
||||||
|
|
||||||
To find out which driver to use, check the "HARDWARE SUPPORT TABLE"
|
You are now ready to configure NUT, and start testing and using it.
|
||||||
in the README file, or data/driver.list.
|
|
||||||
|
|
||||||
Once you have picked a driver, create a section for your UPS in
|
You can jump directly to the <<Configuration_notes,NUT configuration>>.
|
||||||
ups.conf. You must supply values for "driver" and "port".
|
|
||||||
|
|
||||||
Some drivers may require other flags or settings. The "desc" value
|
|
||||||
is optional, but is recommended to provide a better description of
|
|
||||||
what your UPS is supporting.
|
|
||||||
|
|
||||||
A typical UPS without any extra settings looks like this:
|
[[Installing_packages]]
|
||||||
|
Installing from packages
|
||||||
|
------------------------
|
||||||
|
|
||||||
[myupsname]
|
This chapter describes the specific installation steps when using
|
||||||
driver = mydriver
|
binary packages that exist on various major systems.
|
||||||
port = /dev/ttyS1
|
|
||||||
desc = "Workstation"
|
|
||||||
|
|
||||||
NOTE: usbhid-ups is a special case and ignores the "port" value.
|
[[Debian]]
|
||||||
You must still set this value, but it does not matter what you set
|
Debian, Ubuntu and other derivatives
|
||||||
it to; you can set "port" to "auto" if you like. If you only own
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
one local UBS UPS, the driver will find it automatically. If you
|
|
||||||
own more than one UBS UPS, refer to the usbhid-ups(8) man page for
|
|
||||||
more information.
|
|
||||||
|
|
||||||
*** References: man pages: ups.conf(5), nutupsdrv(8), plus
|
NOTE: NUT is packaged and well maintained in these systems.
|
||||||
whatever driver(s) you intend to use.
|
The official Debian packager is part of the NUT Team.
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
Using your prefered method (apt-get, aptitude, Synaptic, ...), install
|
||||||
|
the 'nut' package, and optionaly the following:
|
||||||
|
|
||||||
8. Start the driver(s) for your hardware.
|
- 'nut-cgi', if you need the CGI (HTML) option,
|
||||||
|
- 'nut-snmp', if you need the snmp-ups driver,
|
||||||
|
- 'nut-xml', for the netxml-ups driver,
|
||||||
|
- 'nut-powerman-pdu', to control the PowerMan daemon (PDU management)
|
||||||
|
- 'nut-dev', if you need the development files.
|
||||||
|
|
||||||
/usr/local/ups/bin/upsdrvctl start
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
- nut-client
|
||||||
|
- nut-hal-drivers
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
Make sure the driver doesn't report any errors. It should show a
|
Configuration files are located in /etc/nut.
|
||||||
few details about the hardware and then enter the background. You
|
nut.conf must be edited to be able to invoke /etc/init.d/nut
|
||||||
should get back to the command prompt a few seconds later. For
|
|
||||||
reference, a successful start of the belkin driver looks like this:
|
|
||||||
|
|
||||||
# /usr/local/ups/bin/upsdrvctl start
|
NOTE: Ubuntu users can access the APT URL installation by clicking on link:apt://nut[this link].
|
||||||
Network UPS Tools - UPS driver controller 1.5.12
|
|
||||||
Network UPS Tools - Belkin Smart protocol driver 0.21 (1.5.12)
|
|
||||||
Detected F6C525-SER on /dev/cuaa0
|
|
||||||
#
|
|
||||||
|
|
||||||
If the driver doesn't start cleanly, make sure you have picked the
|
|
||||||
right one for your hardware. You might need to try other drivers
|
|
||||||
by changing the "driver=" value in ups.conf.
|
|
||||||
|
|
||||||
Be sure to check the driver's man page to see if it needs any extra
|
[[Mandriva]]
|
||||||
settings in ups.conf to detect your hardware.
|
Mandriva
|
||||||
|
~~~~~~~~
|
||||||
|
|
||||||
If it says "can't bind /var/state/ups/..." or similar, then your
|
NOTE: NUT is packaged and well maintained in these systems.
|
||||||
state path probably isn't writable by the driver. Check the
|
The official Mandriva packager is part of the NUT Team.
|
||||||
permissions and mode on that directory (step 5).
|
|
||||||
|
|
||||||
After making changes, try step 6 again.
|
Using your prefered method (urpmi, RPMdrake, ...), install one of the two below
|
||||||
|
packages:
|
||||||
|
|
||||||
*** References: man pages: nutupsdrv(8), upsdrvctl(8)
|
- 'nut-server' if you have a 'standalone' or 'netserver' installation,
|
||||||
|
- 'nut' if you have a 'netclient' installation.
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
Optionaly, you can also install the following:
|
||||||
|
|
||||||
9. Configure upsd, which serves data from the drivers to the clients.
|
- 'nut-cgi', if you need the CGI (HTML) option,
|
||||||
|
- 'nut-devel', if you need the development files.
|
||||||
|
|
||||||
First, edit upsd.conf to allow access to your client systems. By
|
|
||||||
default, upsd will only listen to localhost port 3493/tcp. If you want
|
|
||||||
to connect to it from other machines, you must specify each interface you
|
|
||||||
want upsd to listen on for connections, optionally with a port number.
|
|
||||||
|
|
||||||
LISTEN 127.0.0.1 3493
|
[[Suse]]
|
||||||
LISTEN ::1 3493
|
Suse / Opensuse
|
||||||
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Note: if you run a firewall of some sort, you may have to add rules
|
NOTE: NUT is packaged and well maintained in these systems.
|
||||||
to allow these incoming connections.
|
The official Suse packager is part of the NUT Team.
|
||||||
|
|
||||||
Next, create upsd.users. For now, this can be an empty file.
|
Install the 'nut-classic' package, and optionaly the following:
|
||||||
You can come back and add more to it later when it's time to
|
|
||||||
configure upsmon or run one of the management tools.
|
|
||||||
|
|
||||||
Do not make either file world-readable, since they both hold
|
- 'nut-drivers-net', if you need the snmp-ups or the netxml-ups drivers,
|
||||||
access control data and passwords. They just need to be readable by
|
- 'nut-cgi', if you need the CGI (HTML) option,
|
||||||
the user you created in the preparation process.
|
- 'nut-devel', if you need the development files,
|
||||||
|
|
||||||
The suggested configuration is to chown it to root, chgrp it to the
|
NOTE: Suse and Opensuse users can use the
|
||||||
group you created, then make it readable by the group.
|
link:http://software.opensuse.org/search?baseproject=ALL&p=1&q=nut[one-click install method]
|
||||||
|
to install NUT.
|
||||||
|
|
||||||
chown root:nut upsd.conf upsd.users
|
|
||||||
chmod 0640 upsd.conf upsd.users
|
|
||||||
|
|
||||||
*** References: man pages: upsd.conf(5), upsd.users(5), upsd(8)
|
[[RedHat]]
|
||||||
|
Red Hat, Fedora and CentOS
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
NOTE: NUT is packaged and well maintained in these systems.
|
||||||
|
The official Red Hat packager is part of the NUT Team.
|
||||||
|
|
||||||
10. Start the network server.
|
Using your prefered method (yum, Add/Remove Software, ...), install one of the
|
||||||
|
two below packages:
|
||||||
|
|
||||||
/usr/local/ups/sbin/upsd
|
- 'nut' if you have a 'standalone' or 'netserver' installation,
|
||||||
|
- 'nut-client' if you have a 'netclient' installation.
|
||||||
|
|
||||||
Make sure it is able to connect to the driver(s) on your system.
|
Optionaly, you can also install the following:
|
||||||
A successful run looks like this:
|
|
||||||
|
|
||||||
# /usr/local/ups/sbin/upsd
|
- 'nut-cgi', if you need the CGI (HTML) option,
|
||||||
Network UPS Tools upsd 1.5.12
|
- 'nut-xml', if you need the netxml-ups driver,
|
||||||
Connected to UPS [belkin]: belkin-cuaa0
|
- 'nut-devel', if you need the development files.
|
||||||
Synchronizing...done
|
|
||||||
#
|
|
||||||
|
|
||||||
upsd prints dots while it waits for the driver to respond. Your
|
|
||||||
system may print more or less depending on how many drivers you
|
|
||||||
have and how fast they are.
|
|
||||||
|
|
||||||
NOTE: if upsd says that it can't connect to a UPS or that the data
|
[[FreeBSD]]
|
||||||
is stale, then your ups.conf is not configured correctly, or you
|
FreeBSD
|
||||||
have a driver that isn't working properly. You must fix this before
|
~~~~~~~
|
||||||
going on to the next step.
|
|
||||||
|
|
||||||
*** Reference: man page: upsd(8)
|
You can either install NUT as a binary package or as a port.
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
Binary package
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
11. Make sure that the UPS is providing good status data.
|
To install the main component, use the following command:
|
||||||
|
|
||||||
/usr/local/ups/bin/upsc myupsname@localhost ups.status
|
# pkg_add -r nut
|
||||||
|
|
||||||
You should see just one line in response:
|
Port
|
||||||
|
^^^^
|
||||||
|
|
||||||
OL
|
The port is located under /usr/ports/sysutils/nut.
|
||||||
|
To install it, use the following command:
|
||||||
|
|
||||||
OL means your system is running on line power. If it says something
|
# cd /usr/ports/sysutils/nut/ && make install clean
|
||||||
else (like OB - on battery, or LB - low battery), your driver was
|
|
||||||
probably misconfigured in step 7. If you reconfigure the driver,
|
|
||||||
use 'upsdrvctl stop' to stop it, then start it again in step 8.
|
|
||||||
|
|
||||||
*** Reference: man page: upsc(8)
|
You have to define WITH_NUT_CGI to build the optional CGI scripts.
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
Optionaly, you can also install the following ports:
|
||||||
|
|
||||||
12. Look at all of the status data which is being monitored.
|
- sysutils/nut-snmp, for the SNMP driver,
|
||||||
|
- sysutils/nut-usb, for the USB drivers,
|
||||||
|
- sysutils/nut-libupsclient, for the upsclient library.
|
||||||
|
|
||||||
/usr/local/ups/bin/upsc myupsname@localhost
|
|
||||||
|
|
||||||
What happens now depends on the kind of UPS and driver you have.
|
You are now ready to configure NUT, and start testing and using it.
|
||||||
In the list, you should see ups.status with the same value you got
|
|
||||||
above. A sample run on a MGE UPS SYSTEMS Ellipse ASR 600 looks
|
|
||||||
like this:
|
|
||||||
|
|
||||||
battery.charge: 82
|
You can jump directly to the
|
||||||
battery.charge.low: 30
|
<<Configuration_notes,NUT configuration>>.
|
||||||
battery.runtime: 1563
|
|
||||||
driver.name: usbhid-ups
|
|
||||||
driver.parameter.port: auto
|
|
||||||
driver.version: 2.0.3
|
|
||||||
driver.version.data: MGE HID 0.8
|
|
||||||
driver.version.internal: 0.28
|
|
||||||
input.transfer.high: 264.0
|
|
||||||
input.transfer.low: 184.0
|
|
||||||
outlet.desc: Main Outlet
|
|
||||||
outlet.id: 1
|
|
||||||
outlet.switchable: 0
|
|
||||||
outlet.1.desc: PowerShare Outlet 1
|
|
||||||
outlet.1.id: 2
|
|
||||||
outlet.1.switch: 0
|
|
||||||
outlet.1.switchable: 0
|
|
||||||
output.voltage: 230.0
|
|
||||||
ups.delay.shutdown: -1
|
|
||||||
ups.delay.start: -10
|
|
||||||
ups.load: 0
|
|
||||||
ups.mfr: MGE UPS SYSTEMS
|
|
||||||
ups.model: Ellipse 600
|
|
||||||
ups.power.nominal: 600
|
|
||||||
ups.serial: AP8F15005
|
|
||||||
ups.status: OB DISCHRG
|
|
||||||
|
|
||||||
*** Reference: man page: upsc(8)
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
13. Edit your startup scripts.
|
|
||||||
|
|
||||||
Make sure upsdrvctl and upsd are run every time your system starts.
|
|
||||||
|
|
||||||
============================================================================
|
|
||||||
============================================================================
|
|
||||||
============================================================================
|
|
||||||
|
|
||||||
Configuring shutdowns for low battery events
|
|
||||||
--------------------------------------------
|
|
||||||
|
|
||||||
The whole point of UPS software is to bring down the OS cleanly when you
|
|
||||||
run out of battery power. Everything else is just eye candy. To make
|
|
||||||
sure your system shuts down properly, you will need to perform some
|
|
||||||
additional configuration and run upsmon. Here are the basics:
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
1. Create a upsd user for upsmon to use while monitoring this UPS.
|
|
||||||
|
|
||||||
Edit upsd.users and create a new section. upsmon will connect
|
|
||||||
to upsd and use this user name (in brackets) and password to
|
|
||||||
authenticate. This example is for a user called "monuser":
|
|
||||||
|
|
||||||
[monuser]
|
|
||||||
password = mypass
|
|
||||||
upsmon master # or upsmon slave
|
|
||||||
|
|
||||||
*** References: man pages: upsd(8), upsd.users(5)
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
2. Reload upsd. Depending on your configuration, you may be able to
|
|
||||||
do this without stopping upsd:
|
|
||||||
|
|
||||||
/usr/local/ups/sbin/upsd -c reload
|
|
||||||
|
|
||||||
If that doesn't work (check the syslog), just restart it:
|
|
||||||
|
|
||||||
/usr/local/ups/sbin/upsd -c stop
|
|
||||||
/usr/local/ups/sbin/upsd
|
|
||||||
|
|
||||||
Later: if you want to make reloading work, see the entry in the FAQ
|
|
||||||
about starting upsd as a different user.
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
3. Set the POWERDOWNFLAG location for upsmon.
|
|
||||||
|
|
||||||
In upsmon.conf, add a POWERDOWNFLAG directive with a filename.
|
|
||||||
upsmon will create this file when the UPS needs to be powered off
|
|
||||||
during a power failure when low battery is reached.
|
|
||||||
|
|
||||||
We will test for the presence of this file in a later step.
|
|
||||||
|
|
||||||
POWERDOWNFLAG /etc/killpower
|
|
||||||
|
|
||||||
*** References: man pages: upsmon(8), upsmon.conf(5)
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
4. Secure upsmon.conf.
|
|
||||||
|
|
||||||
The recommended setting is to have it owned by root:nut, then
|
|
||||||
make it readable by the group and not world. This file contains
|
|
||||||
passwords that could be used by an attacker to start a shutdown,
|
|
||||||
so keep it secure.
|
|
||||||
|
|
||||||
chown root:nut upsmon.conf
|
|
||||||
chmod 0640 upsmon.conf
|
|
||||||
|
|
||||||
This step has been placed early in the process so you secure this
|
|
||||||
file before adding sensitive data in the next step.
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
5. Create a MONITOR directive for upsmon
|
|
||||||
|
|
||||||
Edit upsmon.conf and create a MONITOR line with the UPS definition
|
|
||||||
(<upsname>@<hostname>), username and password from step 2, and
|
|
||||||
the master or slave setting.
|
|
||||||
|
|
||||||
If it's the master (i.e., it's connected to this UPS directly):
|
|
||||||
|
|
||||||
MONITOR myupsname@mybox 1 monuser mypass master
|
|
||||||
|
|
||||||
If it's just monitoring this UPS over the network, and some other
|
|
||||||
system is the master:
|
|
||||||
|
|
||||||
MONITOR myupsname@mybox 1 monuser mypass slave
|
|
||||||
|
|
||||||
The number "1" here is the power value. This should always be set
|
|
||||||
to 1 unless you have a very special (read: expensive) system with
|
|
||||||
redundant power supplies. See big-servers.txt and data-room.txt.
|
|
||||||
|
|
||||||
*** References: man pages: upsmon(8), upsmon.conf(5)
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
6. Define a SHUTDOWNCMD for upsmon.
|
|
||||||
|
|
||||||
Still in upsmon.conf, add a directive that tells upsmon how to
|
|
||||||
shut down your system. This example seems to work on most systems:
|
|
||||||
|
|
||||||
SHUTDOWNCMD "/sbin/shutdown -h +0"
|
|
||||||
|
|
||||||
Notice the presence of "quotes" here to keep it together.
|
|
||||||
|
|
||||||
If your system has special needs, you may want to set this to
|
|
||||||
a script which does local shutdown tasks before calling init.
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
7. Start upsmon.
|
|
||||||
|
|
||||||
/usr/local/ups/sbin/upsmon
|
|
||||||
|
|
||||||
If it complains about something, then check your configuration.
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
8. Look for messages in the syslog to indicate success. It should look
|
|
||||||
something like this:
|
|
||||||
|
|
||||||
May 29 01:11:27 mybox upsmon[102]: Startup successful
|
|
||||||
May 29 01:11:28 mybox upsd[100]: Client monuser@192.168.50.1
|
|
||||||
logged into UPS [myupsname]
|
|
||||||
|
|
||||||
Any errors seen here are probably due to an error in the config
|
|
||||||
files of either upsmon or upsd. You should fix them before
|
|
||||||
continuing.
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
9. Edit your startup scripts: add upsmon
|
|
||||||
|
|
||||||
Make sure upsmon starts when your system comes up. Do it after
|
|
||||||
upsdrvctl and upsd, or it will complain about not being able to
|
|
||||||
contact the server.
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
10. Edit your shutdown scripts: add upsdrvctl shutdown
|
|
||||||
|
|
||||||
You should configure your system to power down the UPS after the
|
|
||||||
filesystems are remounted read-only. Have it look for the presence
|
|
||||||
of the POWERDOWNFLAG (from upsmon.conf), using this as an example:
|
|
||||||
|
|
||||||
if (test -f /etc/killpower)
|
|
||||||
then
|
|
||||||
echo "Killing the power, bye!"
|
|
||||||
/usr/local/ups/bin/upsdrvctl shutdown
|
|
||||||
|
|
||||||
sleep 120
|
|
||||||
|
|
||||||
# uh oh... the UPS power-off failed
|
|
||||||
# you probably want to reboot here so you don't get stuck!
|
|
||||||
# *** see the section on power races in shutdown.txt! ***
|
|
||||||
fi
|
|
||||||
|
|
||||||
Be careful: that upsdrvctl command will probably power off your
|
|
||||||
machine. Don't use it unless your system is ready to be halted by
|
|
||||||
force. If you run RAID, be sure the arrays are ready to lose power.
|
|
||||||
Your kernel's power-off routines may not execute.
|
|
||||||
|
|
||||||
Make sure that the filesystem(s) holding your UPS drivers and
|
|
||||||
configuration details are still mounted when that part of the script
|
|
||||||
is run. You need upsdrvctl, ups.conf, and any drivers for the
|
|
||||||
hardware on your system.
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
More information can be found in the README file, the shutdown.txt document,
|
|
||||||
the upsmon(8) man page and the upsmon.conf(5) man page.
|
|
||||||
|
|
31
Makefile.am
|
@ -5,7 +5,7 @@ ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
# subdirectories to build and distribute. The order matters, as
|
# subdirectories to build and distribute. The order matters, as
|
||||||
# several subdirectories depend on stuff in "common" being built first
|
# several subdirectories depend on stuff in "common" being built first
|
||||||
SUBDIRS = include common clients conf data docs drivers lib man \
|
SUBDIRS = include common clients conf data docs drivers lib \
|
||||||
tools scripts server
|
tools scripts server
|
||||||
|
|
||||||
EXTRA_DIST = MAINTAINERS UPGRADING
|
EXTRA_DIST = MAINTAINERS UPGRADING
|
||||||
|
@ -16,8 +16,8 @@ EXTRA_DIST = MAINTAINERS UPGRADING
|
||||||
# need to give hotplug-dir and udev-dir, so that staged install does
|
# need to give hotplug-dir and udev-dir, so that staged install does
|
||||||
# not fail.
|
# not fail.
|
||||||
|
|
||||||
DISTCHECK_FLAGS = --with-all --with-ssl --with-ipv6
|
DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto
|
||||||
DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-ipv6=auto
|
DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto
|
||||||
|
|
||||||
DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \
|
DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \
|
||||||
--with-hotplug-dir='$${prefix}/etc/hotplug' \
|
--with-hotplug-dir='$${prefix}/etc/hotplug' \
|
||||||
|
@ -27,8 +27,29 @@ distcheck-light:
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck
|
$(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck
|
||||||
|
|
||||||
# workaround the dist generated files that are also part of the distribution
|
# workaround the dist generated files that are also part of the distribution
|
||||||
distcleancheck_listfiles = \
|
# Note that distcleancheck is disabled for now, while waiting for a proper
|
||||||
find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';'
|
# solution, that do not break older unix systems
|
||||||
|
#distcleancheck_listfiles = \
|
||||||
|
# find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';'
|
||||||
|
distcleancheck:
|
||||||
|
@:
|
||||||
|
|
||||||
|
# Automatically generate the ChangeLog from SVN logs:
|
||||||
|
MAINTAINERCLEAN_FILES = ChangeLog
|
||||||
|
ChangeLog: tools/svn2cl.authors
|
||||||
|
svn2cl --group-by-day --include-rev --authors=$< --revision 'HEAD:2332' --output=$@ || \
|
||||||
|
echo "svn2cl failed to generate the ChangeLog. See http://trac.networkupstools.org/projects/nut/timeline" > $@
|
||||||
|
|
||||||
|
if HAVE_ASCIIDOC
|
||||||
|
website:
|
||||||
|
cd docs; $(MAKE) $(AM_MAKEFLAGS) website
|
||||||
|
cd docs/man; $(MAKE) $(AM_MAKEFLAGS) html-man
|
||||||
|
cd tools; $(MAKE) $(AM_MAKEFLAGS) website
|
||||||
|
cd docs/website; $(MAKE) $(AM_MAKEFLAGS) website
|
||||||
|
else !HAVE_ASCIIDOC
|
||||||
|
website:
|
||||||
|
@echo "Not building website since 'asciidoc' was not found."
|
||||||
|
endif !HAVE_ASCIIDOC
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# targets from old build system (pre-automake).
|
# targets from old build system (pre-automake).
|
||||||
|
|
87
Makefile.in
|
@ -1,4 +1,4 @@
|
||||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
@ -39,15 +39,16 @@ target_triplet = @target@
|
||||||
subdir = .
|
subdir = .
|
||||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||||
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
|
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
|
||||||
ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \
|
ChangeLog INSTALL NEWS TODO compile config.guess config.sub \
|
||||||
install-sh ltmain.sh missing
|
depcomp install-sh ltmain.sh missing
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_ipv6.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
|
@ -57,6 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
|
$(top_srcdir)/m4/nut_config_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.in
|
$(top_srcdir)/configure.in
|
||||||
|
@ -120,9 +122,12 @@ am__relativize = \
|
||||||
DIST_ARCHIVES = $(distdir).tar.gz
|
DIST_ARCHIVES = $(distdir).tar.gz
|
||||||
GZIP_ENV = --best
|
GZIP_ENV = --best
|
||||||
distuninstallcheck_listfiles = find . -type f -print
|
distuninstallcheck_listfiles = find . -type f -print
|
||||||
|
distcleancheck_listfiles = find . -type f -print
|
||||||
|
A2X = @A2X@
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
|
ASCIIDOC = @ASCIIDOC@
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -135,8 +140,10 @@ CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DBLATEX = @DBLATEX@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -153,7 +160,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@
|
||||||
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
||||||
HAL_FDI_PATH = @HAL_FDI_PATH@
|
HAL_FDI_PATH = @HAL_FDI_PATH@
|
||||||
HAL_USER = @HAL_USER@
|
HAL_USER = @HAL_USER@
|
||||||
HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
@ -164,22 +170,22 @@ LDFLAGS = @LDFLAGS@
|
||||||
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
||||||
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
||||||
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
||||||
LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@
|
LIBHAL_LIBS = @LIBHAL_LIBS@
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@
|
LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
||||||
LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@
|
LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
@ -281,7 +287,7 @@ ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
# subdirectories to build and distribute. The order matters, as
|
# subdirectories to build and distribute. The order matters, as
|
||||||
# several subdirectories depend on stuff in "common" being built first
|
# several subdirectories depend on stuff in "common" being built first
|
||||||
SUBDIRS = include common clients conf data docs drivers lib man \
|
SUBDIRS = include common clients conf data docs drivers lib \
|
||||||
tools scripts server
|
tools scripts server
|
||||||
|
|
||||||
EXTRA_DIST = MAINTAINERS UPGRADING
|
EXTRA_DIST = MAINTAINERS UPGRADING
|
||||||
|
@ -291,17 +297,15 @@ EXTRA_DIST = MAINTAINERS UPGRADING
|
||||||
# distcheck-light". Try to check as many features as possible! Also
|
# distcheck-light". Try to check as many features as possible! Also
|
||||||
# need to give hotplug-dir and udev-dir, so that staged install does
|
# need to give hotplug-dir and udev-dir, so that staged install does
|
||||||
# not fail.
|
# not fail.
|
||||||
DISTCHECK_FLAGS = --with-all --with-ssl --with-ipv6
|
DISTCHECK_FLAGS = --with-all --with-ssl --with-doc=auto
|
||||||
DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-ipv6=auto
|
DISTCHECK_LIGHT_FLAGS = --with-all=auto --with-ssl=auto --with-doc=auto
|
||||||
DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \
|
DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \
|
||||||
--with-hotplug-dir='$${prefix}/etc/hotplug' \
|
--with-hotplug-dir='$${prefix}/etc/hotplug' \
|
||||||
--with-udev-dir='$${prefix}/etc/udev'
|
--with-udev-dir='$${prefix}/etc/udev'
|
||||||
|
|
||||||
|
|
||||||
# workaround the dist generated files that are also part of the distribution
|
# Automatically generate the ChangeLog from SVN logs:
|
||||||
distcleancheck_listfiles = \
|
MAINTAINERCLEAN_FILES = ChangeLog
|
||||||
find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';'
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# targets from old build system (pre-automake).
|
# targets from old build system (pre-automake).
|
||||||
|
@ -361,7 +365,7 @@ distclean-libtool:
|
||||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||||
# (2) otherwise, pass the desired values on the `make' command line.
|
# (2) otherwise, pass the desired values on the `make' command line.
|
||||||
$(RECURSIVE_TARGETS):
|
$(RECURSIVE_TARGETS):
|
||||||
@failcom='exit 1'; \
|
@fail= failcom='exit 1'; \
|
||||||
for f in x $$MAKEFLAGS; do \
|
for f in x $$MAKEFLAGS; do \
|
||||||
case $$f in \
|
case $$f in \
|
||||||
*=* | --[!k]*);; \
|
*=* | --[!k]*);; \
|
||||||
|
@ -386,7 +390,7 @@ $(RECURSIVE_TARGETS):
|
||||||
fi; test -z "$$fail"
|
fi; test -z "$$fail"
|
||||||
|
|
||||||
$(RECURSIVE_CLEAN_TARGETS):
|
$(RECURSIVE_CLEAN_TARGETS):
|
||||||
@failcom='exit 1'; \
|
@fail= failcom='exit 1'; \
|
||||||
for f in x $$MAKEFLAGS; do \
|
for f in x $$MAKEFLAGS; do \
|
||||||
case $$f in \
|
case $$f in \
|
||||||
*=* | --[!k]*);; \
|
*=* | --[!k]*);; \
|
||||||
|
@ -550,7 +554,8 @@ distdir: $(DISTFILES)
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
-test -n "$(am__skip_mode_fix)" \
|
-test -n "$(am__skip_mode_fix)" \
|
||||||
|| find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
|| find "$(distdir)" -type d ! -perm -755 \
|
||||||
|
-exec chmod u+rwx,go+rx {} \; -o \
|
||||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||||
|
@ -594,17 +599,17 @@ dist dist-all: distdir
|
||||||
distcheck: dist
|
distcheck: dist
|
||||||
case '$(DIST_ARCHIVES)' in \
|
case '$(DIST_ARCHIVES)' in \
|
||||||
*.tar.gz*) \
|
*.tar.gz*) \
|
||||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||||
*.tar.bz2*) \
|
*.tar.bz2*) \
|
||||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||||
*.tar.lzma*) \
|
*.tar.lzma*) \
|
||||||
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
|
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
|
||||||
*.tar.xz*) \
|
*.tar.xz*) \
|
||||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||||
*.tar.Z*) \
|
*.tar.Z*) \
|
||||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||||
*.shar.gz*) \
|
*.shar.gz*) \
|
||||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||||
*.zip*) \
|
*.zip*) \
|
||||||
unzip $(distdir).zip ;;\
|
unzip $(distdir).zip ;;\
|
||||||
esac
|
esac
|
||||||
|
@ -654,15 +659,6 @@ distuninstallcheck:
|
||||||
fi ; \
|
fi ; \
|
||||||
$(distuninstallcheck_listfiles) ; \
|
$(distuninstallcheck_listfiles) ; \
|
||||||
exit 1; } >&2
|
exit 1; } >&2
|
||||||
distcleancheck: distclean
|
|
||||||
@if test '$(srcdir)' = . ; then \
|
|
||||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
|
||||||
exit 1 ; \
|
|
||||||
fi
|
|
||||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
|
||||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
|
||||||
$(distcleancheck_listfiles) ; \
|
|
||||||
exit 1; } >&2
|
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-recursive
|
check: check-recursive
|
||||||
all-am: Makefile
|
all-am: Makefile
|
||||||
|
@ -784,6 +780,25 @@ uninstall-am:
|
||||||
distcheck-light:
|
distcheck-light:
|
||||||
$(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck
|
$(MAKE) $(AM_MAKEFLAGS) DISTCHECK_FLAGS="$(DISTCHECK_LIGHT_FLAGS)" distcheck
|
||||||
|
|
||||||
|
# workaround the dist generated files that are also part of the distribution
|
||||||
|
# Note that distcleancheck is disabled for now, while waiting for a proper
|
||||||
|
# solution, that do not break older unix systems
|
||||||
|
#distcleancheck_listfiles = \
|
||||||
|
# find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';'
|
||||||
|
distcleancheck:
|
||||||
|
@:
|
||||||
|
ChangeLog: tools/svn2cl.authors
|
||||||
|
svn2cl --group-by-day --include-rev --authors=$< --revision 'HEAD:2332' --output=$@ || \
|
||||||
|
echo "svn2cl failed to generate the ChangeLog. See http://trac.networkupstools.org/projects/nut/timeline" > $@
|
||||||
|
|
||||||
|
@HAVE_ASCIIDOC_TRUE@website:
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ cd docs; $(MAKE) $(AM_MAKEFLAGS) website
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ cd docs/man; $(MAKE) $(AM_MAKEFLAGS) html-man
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ cd tools; $(MAKE) $(AM_MAKEFLAGS) website
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ cd docs/website; $(MAKE) $(AM_MAKEFLAGS) website
|
||||||
|
@HAVE_ASCIIDOC_FALSE@website:
|
||||||
|
@HAVE_ASCIIDOC_FALSE@ @echo "Not building website since 'asciidoc' was not found."
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@echo $(WARN)
|
@echo $(WARN)
|
||||||
@echo "Warning: 'make build' is deprecated. Use 'make all' instead."
|
@echo "Warning: 'make build' is deprecated. Use 'make all' instead."
|
||||||
|
|
61
NEWS
|
@ -2,6 +2,67 @@ If you're upgrading from an earlier version, see the UPGRADING file.
|
||||||
|
|
||||||
For a complete list of changes, please refer to the ChangeLog file.
|
For a complete list of changes, please refer to the ChangeLog file.
|
||||||
|
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
Release notes for NUT 2.6.0 - what's new since 2.4.3:
|
||||||
|
|
||||||
|
- the main focus of this release is the complete documentation revamping,
|
||||||
|
using AsciiDoc. This includes a new website, user manual, developer guide,
|
||||||
|
packager guide and manual pages, available in various formats (single and
|
||||||
|
multiple pages HTML, and PDF at the moment).
|
||||||
|
Be sure to check the --with-doc configure option help, and
|
||||||
|
docs/configure.txt for more information.
|
||||||
|
|
||||||
|
- Add Augeas support, to provide easy NUT configuration management, through
|
||||||
|
tools and development APIs. For more information, refer to the developer
|
||||||
|
guide, or scripts/augeas/README in the source directory.
|
||||||
|
|
||||||
|
- support for new devices: APC 5G; Eaton PowerWare 5119 RM (smart mode using
|
||||||
|
upscode2 driver), Eaton Best Ferrups (using older ConnectUPS card),
|
||||||
|
Eaton 9395 (serial interface), Eaton ConnectUPS X / BD / E Slot;
|
||||||
|
HP T1000 INTL, HP T1500 INTL, HP T750 G2, HP R1500 G2 INTL; iDowell iBox UPS;
|
||||||
|
Tripp Lite SmartOnline SU1000XLA, Tripp Lite Smart1000LCD, and some
|
||||||
|
more USB/HID devices IDs; CyberPower CP1500AVRLCD and CP1350AVRLCD;
|
||||||
|
PowerWalker Line-Interactive VI 1400 ; Rocketfish RF-1000VA / RF-1025VA.
|
||||||
|
|
||||||
|
- usbhid-ups has better support for shutting down APC SmartUPS RM series,
|
||||||
|
and finally fix the "buffer size" issue, which was breaking some
|
||||||
|
devices data retrieval, or truncating some data on others.
|
||||||
|
|
||||||
|
- snmp-ups now support SNMP v3 and its security parameters. IETF MIB support
|
||||||
|
has also been extended.
|
||||||
|
|
||||||
|
- fix dummy-ups simulation driver status handling bug, and add the
|
||||||
|
capability to remove exposed variables on the fly.
|
||||||
|
|
||||||
|
- the belkin driver now support control commands and status reporting
|
||||||
|
for beeper and battery test.
|
||||||
|
|
||||||
|
- the powerpanel driver supports more older CyberPower units.
|
||||||
|
|
||||||
|
- mge-utalk, upscode2, blazer and liebert-esp2 have also received some
|
||||||
|
care, and been improved.
|
||||||
|
|
||||||
|
- NUT-Monitor and the PyNUT client module have been updated to 1.3,
|
||||||
|
adding more features like automatic connection to the first local device
|
||||||
|
and i18n support.
|
||||||
|
|
||||||
|
- improve configure time dependencies checking and processing.
|
||||||
|
|
||||||
|
- improve older Unix systems support (HP-UX, Aix, ...) for missing functions.
|
||||||
|
|
||||||
|
- refresh and improve USB helper files (udev and UPower).
|
||||||
|
|
||||||
|
- more generation automation: the ChangeLog file is now generated
|
||||||
|
automatically at distribution time, along with the files needed for
|
||||||
|
the website hardware compatibility list.
|
||||||
|
|
||||||
|
- SSL support has also received some improvements.
|
||||||
|
|
||||||
|
- tcp-wrapper now allows hostnames in /etc/hosts.allow too (not only IPv4
|
||||||
|
and/or IPv6 addresses).
|
||||||
|
|
||||||
|
- many bugfixes, cleanup and improvements.
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
Release notes for NUT 2.4.3 - what's new since 2.4.2:
|
Release notes for NUT 2.4.3 - what's new since 2.4.2:
|
||||||
|
|
||||||
|
|
568
README
|
@ -1,144 +1,111 @@
|
||||||
=================================
|
Network UPS Tools Overview
|
||||||
Network UPS Tools Documentation
|
===========================
|
||||||
=================================
|
|
||||||
|
|
||||||
:Info: Program support page: <http://www.networkupstools.org/>
|
|
||||||
:Author: Arnaud Quette <aquette.dev@gmail.com> and others, see AUTHORS file.
|
|
||||||
:Copyright: Released under the GNU GPL - see COPYING for details.
|
|
||||||
|
|
||||||
Mailing list details: http://alioth.debian.org/mail/?group_id=30602
|
|
||||||
|
|
||||||
.. contents::
|
|
||||||
|
|
||||||
===========
|
|
||||||
Description
|
Description
|
||||||
===========
|
-----------
|
||||||
|
|
||||||
Network UPS Tools is a collection of programs which provide a common
|
Network UPS Tools is a collection of programs which provide a common
|
||||||
interface for monitoring and administering UPS and PDU hardware. NUT comes in
|
interface for monitoring and administering UPS, PDU and SCD hardware.
|
||||||
two flavors: the "classic" and the "HAL enabled" one.
|
It uses a layered approach to connect all of the parts.
|
||||||
|
|
||||||
The "classic" flavor
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
It is the standard installation that uses a layered approach to connect
|
|
||||||
all of the NUT parts.
|
|
||||||
|
|
||||||
Drivers are provided for a wide assortment of equipment. They
|
Drivers are provided for a wide assortment of equipment. They
|
||||||
understand the specific language of each device and map it back to a
|
understand the specific language of each device and map it back to a
|
||||||
compatibility layer. This means both an expensive "smart" protocol UPS
|
compatibility layer. This means both an expensive high end UPS, a simple
|
||||||
and a simple "power strip" model can be handled transparently.
|
"power strip" PDU, or any other power device can be handled transparently with
|
||||||
|
a uniform management interface.
|
||||||
|
|
||||||
This information is cached by the network server ``upsd``, which then
|
This information is cached by the network server `upsd`, which then
|
||||||
answers queries from the clients. upsd contains a number of access
|
answers queries from the clients. upsd contains a number of access
|
||||||
control features to limit the abilities of the clients. Only authorized
|
control features to limit the abilities of the clients. Only authorized
|
||||||
hosts may monitor or control your hardware if you wish. Since the
|
hosts may monitor or control your hardware if you wish. Since the
|
||||||
notion of monitoring over the network is built into the software, you
|
notion of monitoring over the network is built into the software, you
|
||||||
can hang many systems off one large UPS and they will all shut down
|
can hang many systems off one large UPS, and they will all shut down
|
||||||
together. You can also use NUT to power on, off or cycle your data centers
|
together. You can also use NUT to power on, off or cycle your data center
|
||||||
nodes, individually or globally through PDUs outlets.
|
nodes, individually or globally through PDU outlets.
|
||||||
|
|
||||||
Clients such as upsmon check on the status of the hardware and do things
|
Clients such as `upsmon` check on the status of the hardware and do things
|
||||||
when necessary. The most important task is shutting down the operating
|
when necessary. The most important task is shutting down the operating
|
||||||
system cleanly before the UPS runs out of power. Other programs are
|
system cleanly before the UPS runs out of power. Other programs are
|
||||||
also provided to log UPS status regularly, monitor status through your
|
also provided to log information regularly, monitor status through your
|
||||||
web browser, and more.
|
web browser, and more.
|
||||||
|
|
||||||
The "HAL enabled" flavor
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
This one is intended for use:
|
|
||||||
|
|
||||||
- with supported USB UPS,
|
|
||||||
- on HAL enabled systems (Linux, FreeBSD, Sun Solaris),
|
|
||||||
- on HAL enabled desktops (Gnome and possibly KDE)
|
|
||||||
|
|
||||||
Using this approach, you don't have to configure NUT files, nor to
|
|
||||||
manually start components, nor to install a specific NUT client.
|
|
||||||
|
|
||||||
Upon plugging your USB UPS, the right driver will be automatically
|
|
||||||
launched, and the according Power Manager GUI will pop up.
|
|
||||||
|
|
||||||
Note that this feature is still beta and incomplete. But it
|
|
||||||
represents a major evolution, and a huge user experience improvement!
|
|
||||||
|
|
||||||
For more information, refer to INSTALL and docs/nut-hal.txt.
|
|
||||||
|
|
||||||
==========
|
|
||||||
Installing
|
Installing
|
||||||
==========
|
----------
|
||||||
|
|
||||||
If you are installing these programs for the first time, go read the
|
If you are installing these programs for the first time, go read the
|
||||||
INSTALL file to find out how to do that. This document contains more
|
<<_installation_instructions,installation instructions>>
|
||||||
information on what all of this stuff does.
|
to find out how to do that. This document contains more information on what all
|
||||||
|
of this stuff does.
|
||||||
|
|
||||||
|
|
||||||
=========
|
|
||||||
Upgrading
|
Upgrading
|
||||||
=========
|
---------
|
||||||
|
|
||||||
When upgrading from an older version, always check the UPGRADING file to
|
When upgrading from an older version, always check the
|
||||||
see what may have changed. Compatibility issues and other changes will
|
<<Upgrading_notes,upgrading notes>> to see what may have
|
||||||
be listed there to ease the process.
|
changed. Compatibility issues and other changes will be listed there to ease
|
||||||
|
the process.
|
||||||
|
|
||||||
|
|
||||||
|
Configuring and using
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Once NUT is installed, refer to the
|
||||||
|
<<Configuration_notes,configuration notes>> for directions.
|
||||||
|
|
||||||
|
|
||||||
=============
|
|
||||||
Documentation
|
Documentation
|
||||||
=============
|
-------------
|
||||||
|
|
||||||
This file gives an overview of the software. You should read the man
|
This is just an overview of the software. You should read the man pages,
|
||||||
pages, included example configuration files, and auxiliary documentation
|
included example configuration files, and auxiliary documentation for the parts
|
||||||
for the parts that you intend to use.
|
that you intend to use.
|
||||||
|
|
||||||
|
|
||||||
===================
|
|
||||||
Network Information
|
Network Information
|
||||||
===================
|
-------------------
|
||||||
|
|
||||||
These programs are designed to share information over the network. In
|
These programs are designed to share information over the network. In
|
||||||
the examples below, ``localhost`` is used as the hostname. This can also
|
the examples below, `localhost` is used as the hostname. This can also
|
||||||
be an IP address or a fully qualified domain name. You can specify a
|
be an IP address or a fully qualified domain name. You can specify a
|
||||||
port number if your upsd process runs on another port.
|
port number if your upsd process runs on another port.
|
||||||
|
|
||||||
In the case of the program ``upsc``, to view the variables on the UPS called
|
In the case of the program `upsc`, to view the variables on the UPS called
|
||||||
sparky on the ``upsd`` server running on the local machine, you'd do this::
|
sparky on the `upsd` server running on the local machine, you'd do this:
|
||||||
|
|
||||||
/usr/local/ups/bin/upsc sparky@localhost
|
/usr/local/ups/bin/upsc sparky@localhost
|
||||||
|
|
||||||
The default port number is 3493. You can change this with
|
The default port number is 3493. You can change this with
|
||||||
"configure --with-port" at compile-time. To make a client talk to upsd
|
"configure --with-port" at compile-time. To make a client talk to upsd
|
||||||
on a specific port, add it after the hostname with a colon, like this::
|
on a specific port, add it after the hostname with a colon, like this:
|
||||||
|
|
||||||
/usr/local/ups/bin/upsc sparky@localhost:1234
|
/usr/local/ups/bin/upsc sparky@localhost:1234
|
||||||
|
|
||||||
This is handy when you have a mixed environment and some of the systems
|
This is handy when you have a mixed environment and some of the systems
|
||||||
are on different ports.
|
are on different ports.
|
||||||
|
|
||||||
The general form for UPS identifiers is this::
|
The general form for UPS identifiers is this:
|
||||||
|
|
||||||
<upsname>[@<hostname>[:<port>]]
|
<upsname>[@<hostname>[:<port>]]
|
||||||
|
|
||||||
Keep this in mind when viewing the examples below.
|
Keep this in mind when viewing the examples below.
|
||||||
|
|
||||||
|
|
||||||
========
|
|
||||||
Manifest
|
Manifest
|
||||||
========
|
--------
|
||||||
|
|
||||||
This package is broken down into several categories:
|
This package is broken down into several categories:
|
||||||
|
|
||||||
- *drivers* - These programs talk directly to your UPS hardware.
|
- *drivers* - These programs talk directly to your UPS hardware.
|
||||||
|
- *server* - upsd serves data from the drivers to the network.
|
||||||
|
- *clients* - They talk to upsd and do things with the status data.
|
||||||
|
- *cgi-bin* - Special class of clients that you can use with your web server.
|
||||||
|
- *scripts* - Contains various scripts, like the Perl and Python binding,
|
||||||
|
integration bits and applications.
|
||||||
|
|
||||||
- *server* - upsd serves data from the drivers to the network.
|
|
||||||
|
|
||||||
- *clients* - They talk to upsd and do things with the status data.
|
|
||||||
|
|
||||||
- *cgi-bin* - Special class of clients that you can use with your web server.
|
|
||||||
|
|
||||||
|
|
||||||
=======
|
|
||||||
Drivers
|
Drivers
|
||||||
=======
|
-------
|
||||||
|
|
||||||
These programs provide support for specific UPS models. They understand
|
These programs provide support for specific UPS models. They understand
|
||||||
the protocols and port specifications which define status information
|
the protocols and port specifications which define status information
|
||||||
|
@ -146,170 +113,189 @@ and convert it to a form that upsd can understand.
|
||||||
|
|
||||||
To configure drivers, edit ups.conf. For this example, we'll have a UPS
|
To configure drivers, edit ups.conf. For this example, we'll have a UPS
|
||||||
called "sparky" that uses the apcsmart driver and is connected to
|
called "sparky" that uses the apcsmart driver and is connected to
|
||||||
``/dev/ttyS1``. That's the second serial port on most Linux-based systems.
|
`/dev/ttyS1`. That's the second serial port on most Linux-based systems.
|
||||||
The entry in ``ups.conf`` looks like this::
|
The entry in `ups.conf` looks like this:
|
||||||
|
|
||||||
[sparky]
|
[sparky]
|
||||||
driver = apcsmart
|
driver = apcsmart
|
||||||
port = /dev/ttyS1
|
port = /dev/ttyS1
|
||||||
|
|
||||||
To start and stop drivers, use upsdrvctl. By default, it will start or
|
To start and stop drivers, use upsdrvctl. By default, it will start or
|
||||||
stop every UPS in the config file::
|
stop every UPS in the config file:
|
||||||
|
|
||||||
/usr/local/ups/bin/upsdrvctl start
|
/usr/local/ups/bin/upsdrvctl start
|
||||||
/usr/local/ups/bin/upsdrvctl stop
|
/usr/local/ups/bin/upsdrvctl stop
|
||||||
|
|
||||||
However, you can also just start or stop one by adding its name::
|
However, you can also just start or stop one by adding its name:
|
||||||
|
|
||||||
/usr/local/ups/bin/upsdrvctl start sparky
|
/usr/local/ups/bin/upsdrvctl start sparky
|
||||||
/usr/local/ups/bin/upsdrvctl stop sparky
|
/usr/local/ups/bin/upsdrvctl stop sparky
|
||||||
|
|
||||||
To get the driver name for your device, refer to the below section
|
To find the driver name for your device, refer to the section below
|
||||||
called "HARDWARE SUPPORT TABLE".
|
called "HARDWARE SUPPORT TABLE".
|
||||||
|
|
||||||
Extra Settings
|
Extra Settings
|
||||||
--------------
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Some drivers may require additional settings to properly communicate
|
Some drivers may require additional settings to properly communicate
|
||||||
with your hardware. If it doesn't detect your UPS by default, check the
|
with your hardware. If it doesn't detect your UPS by default, check the
|
||||||
driver's man page or help (-h) to see which options are available.
|
driver's man page or help (-h) to see which options are available.
|
||||||
|
|
||||||
For example, the apcsmart driver allows setting "cable" to "940-0095B".
|
For example, the usbhid-ups driver allows you to use USB serial numbers to
|
||||||
To use this feature, just add another line to your ups.conf section for
|
distingish between units via the "serial" configuration option. To use this
|
||||||
that UPS::
|
feature, just add another line to your ups.conf section for that UPS:
|
||||||
|
|
||||||
[sparky]
|
[sparky]
|
||||||
driver = apcsmart
|
driver = usbhid-ups
|
||||||
port = /dev/ttyS1
|
port = auto
|
||||||
cable = 940-0095B
|
serial = 1234567890
|
||||||
|
|
||||||
Hardware Support Table
|
Hardware Compatibility List
|
||||||
----------------------
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The NUT Hardware support table is available in the source directory:
|
The <<HCL,Hardware Compatibility List>> is available in the source directory
|
||||||
|
('nut-X.Y.Z/data/driver.list'), and is generally distributed with packages.
|
||||||
nut-X.Y.Z/data/driver.list
|
|
||||||
|
|
||||||
This one should also be distributed with your favorite packages.
|
|
||||||
For example, it is available on Debian systems as:
|
For example, it is available on Debian systems as:
|
||||||
|
|
||||||
/usr/share/nut/driver.list
|
/usr/share/nut/driver.list
|
||||||
|
|
||||||
For another take on this list, try the web page:
|
This table is also available link:http://www.networkupstools.org/stable-hcl.html[online].
|
||||||
|
|
||||||
http://random.networkupstools.org/compat/
|
|
||||||
|
|
||||||
If your driver has vanished, see the FAQ and UPGRADING files.
|
If your driver has vanished, see the link:FAQ.html[FAQ] and
|
||||||
|
<<Upgrading_notes,Upgrading notes>>.
|
||||||
|
|
||||||
Generic UPS Driver
|
Generic Device Drivers
|
||||||
------------------
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The ``genericups`` driver will support many models that use the same basic
|
NUT provides several generic drivers that support a variety of very similar models.
|
||||||
|
|
||||||
|
- The `genericups` driver supports many serial models that use the same basic
|
||||||
principle to communicate with the computer. This is known as "contact
|
principle to communicate with the computer. This is known as "contact
|
||||||
closure", and basically involves raising or lowering signals to indicate
|
closure", and basically involves raising or lowering signals to indicate
|
||||||
power status.
|
power status.
|
||||||
|
+
|
||||||
This type of UPS tends to be cheaper, and only provides the very simplest
|
This type of UPS tends to be cheaper, and only provides the very simplest
|
||||||
data about power and battery status. Advanced features like battery
|
data about power and battery status. Advanced features like battery
|
||||||
charge readings and such require a "smart" UPS and a driver which
|
charge readings and such require a "smart" UPS and a driver which
|
||||||
supports it.
|
supports it.
|
||||||
|
+
|
||||||
|
See the linkman:genericups[8] man page for more information.
|
||||||
|
|
||||||
See the genericups(8) man page for more information.
|
- The `usbhid-ups` driver attempts to communicate with USB HID Power Device
|
||||||
|
Class (PDC) UPSes. These units generally implement the same basic protocol,
|
||||||
|
with minor variations in the exact set of supported attributes. This driver
|
||||||
|
also applies several correction factors when the UPS firmware reports values
|
||||||
|
with incorrect scale factors.
|
||||||
|
+
|
||||||
|
See the linkman:usbhid-ups[8] man page for more information.
|
||||||
|
|
||||||
|
- The `blazer_ser` and `blazer_usb` drivers supports the Megatec / Q1
|
||||||
|
protocol that is used in many brands (Blazer, Energy Sistem, Fenton
|
||||||
|
Technologies, Mustek and many others).
|
||||||
|
+
|
||||||
|
See the linkman:blazer[8] man page for more information.
|
||||||
|
|
||||||
|
- The `snmp-ups` driver handles various SNMP enabled devices, from many
|
||||||
|
different manufacturers. In SNMP terms, `snmp-ups` is a manager, that
|
||||||
|
monitors SNMP agents.
|
||||||
|
+
|
||||||
|
See the linkman:snmp-ups[8] man page for more information.
|
||||||
|
|
||||||
|
- The `powerman-pdu` is a bridge to the PowerMan daemon, thus handling all
|
||||||
|
PowerMan supported devices. The PowerMan project supports several serial
|
||||||
|
and networked PDU, along with Blade and IPMI enabled servers.
|
||||||
|
+
|
||||||
|
See the linkman:powerman-pdu[8] man page for more
|
||||||
|
information.
|
||||||
|
|
||||||
There is also a document called contact-closure.txt included with the
|
|
||||||
source distribution that contains information on this kind of hardware
|
|
||||||
and details on adding additional types to the genericups driver.
|
|
||||||
|
|
||||||
UPS Shutdowns
|
UPS Shutdowns
|
||||||
-------------
|
~~~~~~~~~~~~~
|
||||||
|
|
||||||
upsdrvctl can also shut down (power down) all of your UPS hardware.
|
upsdrvctl can also shut down (power down) all of your UPS hardware.
|
||||||
|
|
||||||
**WARNING:** if you play around with this command, expect your filesystems
|
WARNING: if you play around with this command, expect your filesystems
|
||||||
to die. Don't power off your computers unless they're ready for it::
|
to die. Don't power off your computers unless they're ready for it:
|
||||||
|
|
||||||
/usr/local/ups/bin/upsdrvctl shutdown
|
/usr/local/ups/bin/upsdrvctl shutdown
|
||||||
/usr/local/ups/bin/upsdrvctl shutdown sparky
|
/usr/local/ups/bin/upsdrvctl shutdown sparky
|
||||||
|
|
||||||
You should read the shutdown.txt file in the docs subdirectory to
|
You should read the <<UPS_shutdown,Configuring automatic UPS shutdowns>>
|
||||||
learn more about when to use this feature. If called at the wrong time,
|
chapter to learn more about when to use this feature. If called at the wrong
|
||||||
you may cause data loss by turning off a system with a filesystem
|
time, you may cause data loss by turning off a system with a filesystem
|
||||||
mounted read-write.
|
mounted read-write.
|
||||||
|
|
||||||
|
Power distribution unit management
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
NUT also provides an advanced support for power distribution units.
|
||||||
|
|
||||||
|
You should read the <<Outlets_PDU_notes,Configuring automatic UPS shutdowns>>
|
||||||
|
chapter to learn more about when to use this feature.
|
||||||
|
|
||||||
==============
|
|
||||||
Network Server
|
Network Server
|
||||||
==============
|
--------------
|
||||||
|
|
||||||
``upsd`` is responsible for passing data from the drivers to the client
|
`upsd` is responsible for passing data from the drivers to the client
|
||||||
programs via the network. It should be run immediately after ``upsdrvctl``
|
programs via the network. It should be run immediately after `upsdrvctl`
|
||||||
in your system's startup scripts.
|
in your system's startup scripts.
|
||||||
|
|
||||||
``upsd`` should be kept running whenever possible, as it is the only source
|
`upsd` should be kept running whenever possible, as it is the only source
|
||||||
of status information for the monitoring clients like ``upsmon``.
|
of status information for the monitoring clients like `upsmon`.
|
||||||
|
|
||||||
|
|
||||||
======
|
Monitoring client
|
||||||
upsmon
|
-----------------
|
||||||
======
|
|
||||||
|
|
||||||
``upsmon`` provides the essential feature that you expect to find in UPS
|
`upsmon` provides the essential feature that you expect to find in UPS
|
||||||
monitoring software: safe shutdowns when the power fails.
|
monitoring software: safe shutdowns when the power fails.
|
||||||
|
|
||||||
In the layered scheme of NUT software, it is a client. It has this
|
In the layered scheme of NUT software, it is a client. It has this
|
||||||
separate section in the documentation since it is so important.
|
separate section in the documentation since it is so important.
|
||||||
|
|
||||||
You configure it by telling it about UPSes that you want to monitor in
|
You configure it by telling it about UPSes that you want to monitor in
|
||||||
upsmon.conf. Each UPS can be defined as one of three possible types:
|
upsmon.conf. Each UPS can be defined as one of two possible types:
|
||||||
|
|
||||||
- Master
|
Master
|
||||||
|
~~~~~~
|
||||||
|
|
||||||
This UPS supplies power to the system running upsmon, and
|
This UPS supplies power to the system running `upsmon`, and this system is also
|
||||||
this system is also responsible for shutting it down when
|
responsible for shutting it down when the battery is depleted. This occurs
|
||||||
the battery is depleted. This occurs after any slave systems
|
after any slave systems have disconnected safely.
|
||||||
have disconnected safely.
|
|
||||||
|
|
||||||
If your UPS is plugged directly into a system's serial port,
|
If your UPS is plugged directly into a system's serial port, the `upsmon`
|
||||||
the upsmon on that system should define that UPS as a master.
|
process on that system should define that UPS as a master.
|
||||||
|
|
||||||
- Slave
|
For a typical home user, there's one computer connected to one UPS.
|
||||||
|
That means you run a driver, `upsd`, and `upsmon` in master mode.
|
||||||
|
|
||||||
This UPS supplies power to the system running upsmon, but
|
Slave
|
||||||
this system can't shut it down directly. This system will
|
~~~~~
|
||||||
shut down the operating system before the master turns off the
|
|
||||||
power.
|
|
||||||
|
|
||||||
Use this mode when you run multiple computers on the same UPS.
|
This UPS may supply power to the system running `upsmon`, but this system can't
|
||||||
Obviously, only one can be connected to the serial port on the
|
shut it down directly.
|
||||||
UPS, and that system is the master. Everything else is a
|
|
||||||
slave.
|
|
||||||
|
|
||||||
- Monitor-only
|
|
||||||
|
|
||||||
This UPS will still generate notifications about status
|
Use this mode when you run multiple computers on the same UPS. Obviously, only
|
||||||
changes (on battery, on line, etc.) but no shutdowns of the
|
one can be connected to the serial port on the UPS, and that system is the
|
||||||
local system result from critical situations on that UPS.
|
master. Everything else is a slave.
|
||||||
|
|
||||||
For a typical home user, there's one computer connected to one UPS.
|
For a typical home user, there's one computer connected to one UPS.
|
||||||
That means you run a driver, upsd, and upsmon in master mode.
|
That means you run a driver, upsd, and upsmon in master mode.
|
||||||
|
|
||||||
Additional Information
|
Additional Information
|
||||||
----------------------
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
More information on configuring upsmon can be found in these places:
|
More information on configuring upsmon can be found in these places:
|
||||||
|
|
||||||
- The man page - upsmon(8)
|
- The linkman:upsmon[8] man page
|
||||||
|
- <<BigServers,Typical setups for big servers>>
|
||||||
- big-servers.txt in the docs subdirectory
|
- <<UPS_shutdown,Configuring automatic UPS shutdowns>> chapter
|
||||||
|
- The stock `upsmon.conf` that comes with the package
|
||||||
- shutdown.txt in the docs subdirectory
|
|
||||||
|
|
||||||
- The stock upsmon.conf that comes with the package
|
|
||||||
|
|
||||||
|
|
||||||
=======
|
|
||||||
Clients
|
Clients
|
||||||
=======
|
-------
|
||||||
|
|
||||||
Clients talk to upsd over the network and do useful things with the data
|
Clients talk to upsd over the network and do useful things with the data
|
||||||
from the drivers. There are tools for command line access, and a few
|
from the drivers. There are tools for command line access, and a few
|
||||||
|
@ -319,48 +305,48 @@ programs.
|
||||||
For more details on specific programs, refer to their man pages.
|
For more details on specific programs, refer to their man pages.
|
||||||
|
|
||||||
upsc
|
upsc
|
||||||
----
|
~~~~
|
||||||
|
|
||||||
upsc is a simple client that will display the values of variables known
|
`upsc` is a simple client that will display the values of variables known
|
||||||
to upsd and your UPS drivers. It will list every variable by default,
|
to `upsd` and your UPS drivers. It will list every variable by default,
|
||||||
or just one if you specify an additional argument. This can be useful
|
or just one if you specify an additional argument. This can be useful
|
||||||
in shell scripts for monitoring something without writing your own
|
in shell scripts for monitoring something without writing your own
|
||||||
network code.
|
network code.
|
||||||
|
|
||||||
upsc is a quick way to find out if your driver(s) and upsd are working
|
`upsc` is a quick way to find out if your driver(s) and upsd are working
|
||||||
together properly. Just run upsc <ups> to see what's going on, i.e.::
|
together properly. Just run `upsc <ups>` to see what's going on, i.e.:
|
||||||
|
|
||||||
morbo:~$ upsc su700@localhost
|
morbo:~$ upsc sparky@localhost
|
||||||
ambient.humidity: 035.6
|
ambient.humidity: 035.6
|
||||||
ambient.humidity.alarm.maximum: NO,NO
|
ambient.humidity.alarm.maximum: NO,NO
|
||||||
ambient.humidity.alarm.minimum: NO,NO
|
ambient.humidity.alarm.minimum: NO,NO
|
||||||
ambient.temperature: 25.14
|
ambient.temperature: 25.14
|
||||||
|
...
|
||||||
|
|
||||||
[ and so on ]
|
If you are interested in writing a simple client that monitors `upsd`,
|
||||||
|
the source code for `upsc` is a good way to learn about using the
|
||||||
If you are interested in writing a simple client that monitors upsd,
|
|
||||||
the source code for upsc is a good way to learn about using the
|
|
||||||
upsclient functions.
|
upsclient functions.
|
||||||
|
|
||||||
See the upsc(8) man page for more information.
|
See the linkman:upsc[8] man page and
|
||||||
|
<<nut-names,NUT command and variable naming scheme>> for more information.
|
||||||
|
|
||||||
upslog
|
upslog
|
||||||
------
|
~~~~~~
|
||||||
|
|
||||||
upslog will write status information from upsd to a file at set
|
`upslog` will write status information from `upsd` to a file at set
|
||||||
intervals. You can use this to generate graphs or reports with other
|
intervals. You can use this to generate graphs or reports with other
|
||||||
programs such as gnuplot.
|
programs such as `gnuplot`.
|
||||||
|
|
||||||
upsrw
|
upsrw
|
||||||
-----
|
~~~~~
|
||||||
|
|
||||||
upsrw allows you to display and change the read/write variables in your
|
`upsrw` allows you to display and change the read/write variables in your
|
||||||
UPS hardware. Not all devices or drivers implement this, so this may
|
UPS hardware. Not all devices or drivers implement this, so this may
|
||||||
not have any effect on your system.
|
not have any effect on your system.
|
||||||
|
|
||||||
A driver that supports read/write variables will give results like this::
|
A driver that supports read/write variables will give results like this:
|
||||||
|
|
||||||
$ upsrw su700@localhost
|
$ upsrw sparky@localhost
|
||||||
|
|
||||||
( many skipped )
|
( many skipped )
|
||||||
|
|
||||||
|
@ -373,64 +359,66 @@ A driver that supports read/write variables will give results like this::
|
||||||
|
|
||||||
( more skipped )
|
( more skipped )
|
||||||
|
|
||||||
On the other hand, one that doesn't support them won't print anything::
|
On the other hand, one that doesn't support them won't print anything:
|
||||||
|
|
||||||
$ upsrw fenton@gearbox
|
$ upsrw fenton@gearbox
|
||||||
|
|
||||||
( nothing )
|
( nothing )
|
||||||
|
|
||||||
upsrw requires administrator powers to change settings in the hardware.
|
`upsrw` requires administrator powers to change settings in the hardware.
|
||||||
Refer to upsd.users(5) for information on defining users in upsd.
|
Refer to linkman:upsd.users[5] for information on defining
|
||||||
|
users in `upsd`.
|
||||||
|
|
||||||
upscmd
|
upscmd
|
||||||
------
|
~~~~~~
|
||||||
|
|
||||||
Some UPS hardware and drivers support the notion of an instant command -
|
Some UPS hardware and drivers support the notion of an instant command -
|
||||||
a feature such as starting a battery test, or powering off the load.
|
a feature such as starting a battery test, or powering off the load.
|
||||||
You can use upscmd to list or invoke instant commands if your
|
You can use upscmd to list or invoke instant commands if your
|
||||||
hardware/drivers support them.
|
hardware/drivers support them.
|
||||||
|
|
||||||
Use the -l command to list them, like this::
|
Use the -l command to list them, like this:
|
||||||
|
|
||||||
$ upscmd -l su700@localhost
|
$ upscmd -l sparky@localhost
|
||||||
Instant commands supported on UPS [su700@localhost]:
|
Instant commands supported on UPS [sparky@localhost]:
|
||||||
|
|
||||||
load.on - Turn on the load immediately
|
load.on - Turn on the load immediately
|
||||||
test.panel.start - Start testing the UPS panel
|
test.panel.start - Start testing the UPS panel
|
||||||
calibrate.start - Start run time calibration
|
calibrate.start - Start run time calibration
|
||||||
calibrate.stop - Stop run time calibration
|
calibrate.stop - Stop run time calibration
|
||||||
|
...
|
||||||
|
|
||||||
[ snip ]
|
`upscmd` requires administrator powers to start instant commands.
|
||||||
|
To define users and passwords in `upsd`, see
|
||||||
|
linkman:upsd.users[5].
|
||||||
|
|
||||||
upscmd requires administrator powers to start instant commands.
|
|
||||||
To define users and passwords in upsd, see upsd.users(5).
|
|
||||||
|
|
||||||
============
|
|
||||||
CGI Programs
|
CGI Programs
|
||||||
============
|
------------
|
||||||
|
|
||||||
The CGI programs are clients that run through your web server. They
|
The CGI programs are clients that run through your web server. They
|
||||||
allow you to see UPS status and perform certain administrative commands
|
allow you to see UPS status and perform certain administrative commands
|
||||||
from any web browser. Javascript and cookies are not required.
|
from any web browser. Javascript and cookies are not required.
|
||||||
|
|
||||||
These programs are not installed or compiled by default. To compile
|
These programs are not installed or compiled by default. To compile
|
||||||
and install them, first run 'configure --with-cgi', then do 'make' and
|
and install them, first run `configure --with-cgi`, then do `make` and
|
||||||
'make install'. If you receive errors about "gd" during configure, go
|
`make install`. If you receive errors about "gd" during configure, go
|
||||||
get it and install it before continuing.
|
get it and install it before continuing.
|
||||||
|
|
||||||
You can get the source here:
|
You can get the source here:
|
||||||
|
|
||||||
http://www.boutell.com/gd/
|
http://www.libgd.org/
|
||||||
|
|
||||||
In the event that you need libpng or zlib in order to compile gd,
|
In the event that you need libpng or zlib in order to compile gd,
|
||||||
they can be found at these URLs:
|
they can be found at these URLs:
|
||||||
|
|
||||||
http://www.libpng.org/pub/png/pngcode.html
|
http://www.libpng.org/pub/png/pngcode.html
|
||||||
|
|
||||||
http://www.gzip.org/zlib/
|
http://www.gzip.org/zlib/
|
||||||
|
|
||||||
|
|
||||||
Access Restrictions
|
Access Restrictions
|
||||||
-------------------
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The CGI programs use hosts.conf to see if they are allowed to talk to a
|
The CGI programs use hosts.conf to see if they are allowed to talk to a
|
||||||
host. This keeps malicious visitors from creating queries from your web
|
host. This keeps malicious visitors from creating queries from your web
|
||||||
|
@ -440,107 +428,58 @@ If you get error messages that say "Access to that host is not
|
||||||
authorized", you're probably missing an entry in your hosts.conf.
|
authorized", you're probably missing an entry in your hosts.conf.
|
||||||
|
|
||||||
upsstats
|
upsstats
|
||||||
--------
|
~~~~~~~~
|
||||||
|
|
||||||
upsstats generates web pages from HTML templates, and plugs in status
|
`upsstats` generates web pages from HTML templates, and plugs in status
|
||||||
information in the right places. It looks like a distant relative of
|
information in the right places. It looks like a distant relative of
|
||||||
APC's old Powerchute interface. You can use it to monitor several
|
APC's old Powerchute interface. You can use it to monitor several
|
||||||
systems or just focus on one.
|
systems or just focus on one.
|
||||||
|
|
||||||
It also can generate IMG references to upsimage.
|
It also can generate IMG references to `upsimage`.
|
||||||
|
|
||||||
upsimage
|
upsimage
|
||||||
--------
|
~~~~~~~~
|
||||||
|
|
||||||
This is usually called by upsstats via IMG SRC tags to draw either the
|
This is usually called by upsstats via IMG SRC tags to draw either the
|
||||||
utility or outgoing voltage, battery charge percent, or load percent.
|
utility or outgoing voltage, battery charge percent, or load percent.
|
||||||
|
|
||||||
upsset
|
upsset
|
||||||
------
|
~~~~~~
|
||||||
|
|
||||||
upsset provides several useful administration functions through a web
|
`upsset` provides several useful administration functions through a web
|
||||||
interface. You can use upsset to kick off instant commands on your UPS
|
interface. You can use `upsset` to kick off instant commands on your UPS
|
||||||
hardware like running a battery test. You can also use it to change
|
hardware like running a battery test. You can also use it to change
|
||||||
variables in your UPS that accept user-specified values.
|
variables in your UPS that accept user-specified values.
|
||||||
|
|
||||||
Essentially, upsset provides the functions of upsrw and upscmd, but
|
Essentially, `upsset` provides the functions of `upsrw` and `upscmd`, but
|
||||||
with a happy pointy-clicky interface.
|
with a happy pointy-clicky interface.
|
||||||
|
|
||||||
upsset will not run until you convince it that you have secured your
|
`upsset` will not run until you convince it that you have secured your
|
||||||
system. You *must* secure your CGI path so that random interlopers
|
system. You *must* secure your CGI path so that random interlopers
|
||||||
can't run this program remotely. See the upsset.conf file. Once you
|
can't run this program remotely. See the `upsset.conf` file. Once you
|
||||||
have secured the directory, you can enable this program in that
|
have secured the directory, you can enable this program in that
|
||||||
configuration file. It is not active by default.
|
configuration file. It is not active by default.
|
||||||
|
|
||||||
|
|
||||||
=====================
|
|
||||||
Support / Help / etc.
|
|
||||||
=====================
|
|
||||||
|
|
||||||
The main URL:
|
|
||||||
|
|
||||||
http://www.networkupstools.org/
|
|
||||||
|
|
||||||
There is also a mailing list for general queries and discussion about
|
|
||||||
this software called nut-upsuser. It typically moves around 50-100 messages
|
|
||||||
per month at the time of this writing. To join, go to the below address and
|
|
||||||
subscribe to the desired list.
|
|
||||||
|
|
||||||
Finally, there is a developer list called nut-upsdev. This is not
|
|
||||||
an install help list, and any such mails probably will be ignored.
|
|
||||||
|
|
||||||
The mailing lists are archived on the web:
|
|
||||||
|
|
||||||
http://alioth.debian.org/mail/?group_id=30602
|
|
||||||
|
|
||||||
Try running some searches against the archives. Many times, problems have
|
|
||||||
already been answered by someone else. Currently, there is no internal
|
|
||||||
search engine, so you will have to try with a search engine like Google.
|
|
||||||
|
|
||||||
There is more documentation in the docs/ directory within the source
|
|
||||||
tree. Be sure to read through the files in there (especially the
|
|
||||||
FAQ) before mailing the list for help. Many times the questions have
|
|
||||||
already been answered in the files which are right in front of you.
|
|
||||||
|
|
||||||
|
|
||||||
===================================
|
|
||||||
Making your own clients (upsclient)
|
|
||||||
===================================
|
|
||||||
|
|
||||||
The upsclient.a library can be linked into other programs to give access
|
|
||||||
to upsd and UPS status information. Clients like upsc are provided as
|
|
||||||
examples of how to retrieve data using the upsclient functions. Other
|
|
||||||
programs not included in this package may also use this library, as wmnut.
|
|
||||||
|
|
||||||
This library file and the associated header files are not installed by
|
|
||||||
default. You must './configure --with-lib' to enable building and
|
|
||||||
installing these files. The libraries can then be build and installed
|
|
||||||
with 'make' and 'make install' as usual. This must be done before
|
|
||||||
building other (non-NUT) programs which depend on them.
|
|
||||||
|
|
||||||
To obtain the right compilation and link flags, two helpers are provided:
|
|
||||||
one for platform providing pkg-config, and the other (libupsclient-config)
|
|
||||||
for platform not providing pkg-config.
|
|
||||||
|
|
||||||
|
|
||||||
=================
|
|
||||||
Version Numbering
|
Version Numbering
|
||||||
=================
|
-----------------
|
||||||
|
|
||||||
The version numbers work like this: if the middle number is odd, it's a
|
The version numbers work like this: if the middle number is odd, it's a
|
||||||
development tree, otherwise it is the stable tree.
|
development tree, otherwise it is the stable tree.
|
||||||
|
|
||||||
The past stable trees were 1.0, 1.2, 1.4 and 2.0, with the latest stable tree
|
The past stable trees were 1.0, 1.2, 1.4, 2.0, 2.2 and 2.4, with the
|
||||||
designated 2.2. The development trees were 1.1, 1.3, 1.5 and 2.1.
|
latest stable tree designated 2.6. The development trees were 1.1, 1.3,
|
||||||
|
1.5, 2.1 and 2.3. As of the 2.4 release, there is no real development
|
||||||
|
branch anymore since the code is available through a revision control
|
||||||
|
system (namely Subversion) and snapshots.
|
||||||
|
|
||||||
The jump to 2.2 is mostly due to the large changes to the features list.
|
Major release jumps are mostly due to large changes to the features
|
||||||
There have also been a number of architectural changes which may not be
|
list. There have also been a number of architectural changes which
|
||||||
noticeable to most users.
|
may not be noticeable to most users, but which can impact developers.
|
||||||
|
|
||||||
|
|
||||||
====================================
|
|
||||||
Backwards and Forwards Compatibility
|
Backwards and Forwards Compatibility
|
||||||
====================================
|
------------------------------------
|
||||||
|
|
||||||
The old network code spans a range from about 0.41.1 when TCP support
|
The old network code spans a range from about 0.41.1 when TCP support
|
||||||
was introduced up to the recent 1.4 series. It used variable names
|
was introduced up to the recent 1.4 series. It used variable names
|
||||||
|
@ -567,21 +506,17 @@ use the new names.
|
||||||
|
|
||||||
Here's a table to make it easier to visualize:
|
Here's a table to make it easier to visualize:
|
||||||
|
|
||||||
+--------+------------------------+
|
[options="header"]
|
||||||
| | Server |
|
|=============================================
|
||||||
+--------+-----+-----+-----+------+
|
| 4+| Server version
|
||||||
| Client | 1.0 | 1.2 | 1.4 | 2.0+ |
|
| *Client version* | 1.0 | 1.2 | 1.4 | 2.0+
|
||||||
+========+=====+=====+=====+======+
|
| 1.0 | yes | yes | yes | no
|
||||||
| 1.0 | yes | yes | yes | no |
|
| 1.2 | yes | yes | yes | no
|
||||||
+--------+-----+-----+-----+------+
|
| 1.4 | yes | yes | yes | yes
|
||||||
| 1.2 | yes | yes | yes | no |
|
| 2.0+ | no | no | yes | yes
|
||||||
+--------+-----+-----+-----+------+
|
|=============================================
|
||||||
| 1.4 | yes | yes | yes | yes |
|
|
||||||
+--------+-----+-----+-----+------+
|
|
||||||
| 2.0 | no | no | yes | yes |
|
|
||||||
+--------+-----+-----+-----+------+
|
|
||||||
|
|
||||||
Version 2.0 (and more recent) does not contain backwards compatibility for
|
Version 2.0, and more recent, do not contain backwards compatibility for
|
||||||
the old protocol and variable/command names. As a result, 2.0 clients can't
|
the old protocol and variable/command names. As a result, 2.0 clients can't
|
||||||
talk to anything older than a 1.4 server. If you ask a 2.0 client to
|
talk to anything older than a 1.4 server. If you ask a 2.0 client to
|
||||||
fetch "STATUS", it will fail. You'll have to ask for "ups.status"
|
fetch "STATUS", it will fail. You'll have to ask for "ups.status"
|
||||||
|
@ -593,67 +528,24 @@ software can easily support both versions as long as they like. If upsd
|
||||||
returns 'ERR UNKNOWN-COMMAND' to a GET request, you need to use REQ.
|
returns 'ERR UNKNOWN-COMMAND' to a GET request, you need to use REQ.
|
||||||
|
|
||||||
|
|
||||||
==========================
|
Support / Help / etc.
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
If you are in need of help, refer to the
|
||||||
|
<<Support_Request,Support instructions>> in the user manual.
|
||||||
|
|
||||||
|
|
||||||
Hacking / Development Info
|
Hacking / Development Info
|
||||||
==========================
|
--------------------------
|
||||||
|
|
||||||
Additional documentation can be found in the docs subdirectory.
|
Additional documentation can be found in:
|
||||||
|
|
||||||
Information on creating new drivers can be found in new-drivers.txt.
|
- the linkdoc:developer-guide[Developer Guide],
|
||||||
Also be sure to look at skel.c and main.c. All drivers are just
|
- the linkdoc:packager-guide[Packager Guide].
|
||||||
collections of support functions built around a common core, so most of
|
|
||||||
the dull housekeeping work has been handled for you.
|
|
||||||
|
|
||||||
Information on the NUT variables naming can be found in new-names.txt.
|
|
||||||
Information on the architecture and how it all fits together is in the
|
|
||||||
design.txt file. In short, there's a lot more documentation out there.
|
|
||||||
|
|
||||||
Also be sure to read developers.txt, as it explains a lot about the
|
|
||||||
tree, including some of the functions that are provided for your use.
|
|
||||||
|
|
||||||
|
|
||||||
================================
|
|
||||||
Acknowledgements / Contributions
|
Acknowledgements / Contributions
|
||||||
================================
|
--------------------------------
|
||||||
|
|
||||||
MGE UPS SYSTEMS provided extensive technical documents for their UPS product
|
|
||||||
line, along with many units for development of NUT-related projects. The
|
|
||||||
company also sponsored and later hired Arnaud Quette to further officially
|
|
||||||
support these efforts.
|
|
||||||
|
|
||||||
Several drivers such as mge-utalk, mge-shut, snmp-ups, hidups, and usbhid-ups
|
|
||||||
are the result of this collaboration, in addition to the WMNut, MGE HID Parser
|
|
||||||
the libhid projects, .... The features page has improved artwork thanks to Luc
|
|
||||||
and Arnaud of MGE. Other client projects such as KNutClient and ups-monitor
|
|
||||||
have also received assistance.
|
|
||||||
|
|
||||||
The master NUT site and several related projects are hosted on MGE's equipment
|
|
||||||
at no cost to the project.
|
|
||||||
|
|
||||||
More information on their open source support can be found on their web site:
|
|
||||||
http://opensource.mgeups.com/contrib.htm
|
|
||||||
|
|
||||||
Fenton Technologies contributed a PowerPal 660 to the project. Their open
|
|
||||||
stance and quick responses to technical inquiries are appreciated for
|
|
||||||
making the development of the fentonups driver possible.
|
|
||||||
|
|
||||||
Bo Kersey of VirCIO (http://www.vircio.com) provided a Best Power
|
|
||||||
Fortress 750 to facilitate the bestups driver.
|
|
||||||
|
|
||||||
Invensys Energy Systems provided the SOLA/Best "Phoenixtec" protocol
|
|
||||||
document currently residing at the following URL:
|
|
||||||
|
|
||||||
http://random.networkupstools.org/protocols/sola.html
|
|
||||||
|
|
||||||
PowerKinetics technical support provided documentation on their MiniCOL
|
|
||||||
protocol, which is archived in the NUT protocol library online:
|
|
||||||
|
|
||||||
http://random.networkupstools.org/protocols/minicol/
|
|
||||||
|
|
||||||
Cyber Power Systems contributed a 700AVR model for testing and driver
|
|
||||||
development.
|
|
||||||
|
|
||||||
Liebert Corporation supplied serial test boxes and a UPStation GXT2
|
|
||||||
with the Web/SNMP card for development of the liebert driver and
|
|
||||||
expansion of the existing snmp-ups driver.
|
|
||||||
|
|
||||||
|
The many people who have participated in creating and improving NUT are
|
||||||
|
listed in the user manual <<Acknowledgements,acknowledgements appendix>>.
|
||||||
|
|
|
@ -1,14 +1,35 @@
|
||||||
Desc: Ideas for future expansion and features
|
NUT roadmap and ideas for future expansion
|
||||||
File: ideas.txt
|
------------------------------------------
|
||||||
Date: 20 October 2003
|
|
||||||
Auth: Russell Kroll <rkroll@exploits.org>
|
|
||||||
|
|
||||||
Here are some ideas that have come up over the years but haven't
|
Here are some ideas that have come up over the years but haven't
|
||||||
been implemented yet. This may be a good place to start if you're
|
been implemented yet. This may be a good place to start if you're
|
||||||
looking for a rainy day hacking project.
|
looking for a rainy day hacking project.
|
||||||
|
|
||||||
|
|
||||||
|
Roadmap
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
2.6
|
||||||
|
^^^
|
||||||
|
|
||||||
|
This release is focused on the website and documentation rewrite, using
|
||||||
|
the excellent link:http://www.methods.co.nz/asciidoc[AsciiDoc].
|
||||||
|
|
||||||
|
2.8
|
||||||
|
^^^
|
||||||
|
|
||||||
|
This branch will focus on configuration and user interface improvements.
|
||||||
|
|
||||||
|
3.0
|
||||||
|
^^^
|
||||||
|
|
||||||
|
This major transition will mark the final switch to a complete power
|
||||||
|
device broker.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Non-network "upsmon"
|
Non-network "upsmon"
|
||||||
====================
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Some systems don't want a daemon listening to the network. This can be
|
Some systems don't want a daemon listening to the network. This can be
|
||||||
for security reasons, or perhaps because the system has been squashed
|
for security reasons, or perhaps because the system has been squashed
|
||||||
|
@ -20,16 +41,13 @@ This also makes monitoring extremely easy to automate - you don't need
|
||||||
to worry about usernames, passwords or firewalling. Just start a driver
|
to worry about usernames, passwords or firewalling. Just start a driver
|
||||||
and drop this program on top of it.
|
and drop this program on top of it.
|
||||||
|
|
||||||
- Parse ups.conf and open the state socket for a driver
|
- Parse ups.conf and open the state socket for a driver
|
||||||
|
- Send DUMPALL and enter a select loop
|
||||||
- Send DUMPALL and enter a select loop
|
- Parse SETINFOs that change ups.status
|
||||||
|
- When you get OB LB, shut down
|
||||||
- Parse SETINFOs that change ups.status
|
|
||||||
|
|
||||||
- When you get OB LB, shut down
|
|
||||||
|
|
||||||
Completely unprivileged upsmon
|
Completely unprivileged upsmon
|
||||||
==============================
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
upsmon currently retains root in a forked process so it can call the
|
upsmon currently retains root in a forked process so it can call the
|
||||||
shutdown command. The only reason it needs root on most systems is that
|
shutdown command. The only reason it needs root on most systems is that
|
||||||
|
@ -51,7 +69,7 @@ down the group access so only upsmon's unprivileged user can access it,
|
||||||
and make that your SHUTDOWNCMD. Then it could drop root completely.
|
and make that your SHUTDOWNCMD. Then it could drop root completely.
|
||||||
|
|
||||||
Chrooted upsmon
|
Chrooted upsmon
|
||||||
===============
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
upsmon could run the network monitoring part in a chroot jail if it had
|
upsmon could run the network monitoring part in a chroot jail if it had
|
||||||
a pipe to another process running outside for NOTIFY dispatches. Such a
|
a pipe to another process running outside for NOTIFY dispatches. Such a
|
||||||
|
@ -64,7 +82,7 @@ All it has to do is dispatch the UPS name and event type.
|
||||||
[start] [type] [length] <name> [stop]
|
[start] [type] [length] <name> [stop]
|
||||||
|
|
||||||
Monitor program with interpreted language
|
Monitor program with interpreted language
|
||||||
=========================================
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Once in awhile, I get requests for a way to shut down based on the UPS
|
Once in awhile, I get requests for a way to shut down based on the UPS
|
||||||
temperature, or ambient humidity, or at a certain battery charge level,
|
temperature, or ambient humidity, or at a certain battery charge level,
|
||||||
|
@ -83,3 +101,18 @@ timers.
|
||||||
|
|
||||||
Due to the expected size and limited audience for such a program, it
|
Due to the expected size and limited audience for such a program, it
|
||||||
might have to be distributed separately.
|
might have to be distributed separately.
|
||||||
|
|
||||||
|
NOTE: Python may be a good candidate.
|
||||||
|
|
||||||
|
Sandbox
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
- check to refresh and integrate the https://alioth.debian.org/pm/?group_id=30602[tasks] list
|
||||||
|
and https://alioth.debian.org/tracker/?atid=411545&group_id=30602&func=browse[feature requests] list from Alioth
|
||||||
|
- add "Generic ?Ascii? driver": I've got to think more about that, but the recent
|
||||||
|
solar panel driver, and the powerman internal approach of a generic engine with
|
||||||
|
a scripting interface is a cool idea.
|
||||||
|
Ref http://powerman.svn.sourceforge.net/viewvc/powerman/trunk/etc/apcpdu.dev?revision=969&view=markup
|
||||||
|
- integrate the (future) new powerman LUA engine (maybe/mustbe used for the driver above?)
|
||||||
|
for native PDU support
|
||||||
|
- see how we can help and collaborate with DeviceKit-power
|
557
UPGRADING
|
@ -1,373 +1,198 @@
|
||||||
This file lists changes that affect users who installed older versions
|
ifdef::txt[]
|
||||||
|
Upgrading notes
|
||||||
|
===============
|
||||||
|
endif::txt[]
|
||||||
|
|
||||||
|
This file lists changes that affect users who installed older versions
|
||||||
of this software. When upgrading from an older version, be sure to
|
of this software. When upgrading from an older version, be sure to
|
||||||
check this file to see if you need to make changes to your system.
|
check this file to see if you need to make changes to your system.
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
Changes from 2.4.3 to 2.6.0
|
||||||
Changes from 2.4.2 to 2.4.3:
|
---------------------------
|
||||||
|
|
||||||
- nothing that affects upgraded systems.
|
- users of the megatec and megatec_usb drivers must respectively switch to
|
||||||
|
blazer_ser and blazer_usb.
|
||||||
---------------------------------------------------------------------------
|
- users of the liebertgxt2 driver are advised that the driver name has changed
|
||||||
Changes from 2.4.1 to 2.4.2:
|
to liebert-esp2.
|
||||||
|
|
||||||
- The default subdriver for the blazer_usb driver USB id 06da:0003 has
|
Changes from 2.4.2 to 2.4.3
|
||||||
changed. If you use such a device and it is no longer working with this
|
---------------------------
|
||||||
driver, override the 'subdriver' default in 'ups.conf' (see man 8 blazer).
|
|
||||||
- NUT ACL and the allowfrom mechanism has been replaced in 2.4.0 by the LISTEN
|
- nothing that affects upgraded systems.
|
||||||
directive and tcp-wrappers respectively. This information was missing
|
|
||||||
below, so a double note has been added.
|
Changes from 2.4.1 to 2.4.2
|
||||||
|
---------------------------
|
||||||
---------------------------------------------------------------------------
|
|
||||||
Changes from 2.4.0 to 2.4.1:
|
- The default subdriver for the blazer_usb driver USB id 06da:0003 has changed.
|
||||||
|
If you use such a device and it is no longer working with this driver, override
|
||||||
- nothing that affects upgraded systems.
|
the 'subdriver' default in 'ups.conf' (see man 8 blazer).
|
||||||
|
- NUT ACL and the allowfrom mechanism has been replaced in 2.4.0 by the LISTEN
|
||||||
---------------------------------------------------------------------------
|
directive and tcp-wrappers respectively. This information was missing below, so
|
||||||
Changes from 2.2.2 to 2.4.0:
|
a double note has been added.
|
||||||
|
|
||||||
- The nut.conf file has been introduced to standardize startup configuration
|
Changes from 2.4.0 to 2.4.1
|
||||||
across the various systems.
|
---------------------------
|
||||||
- The cpsups and nitram drivers have been replaced by the powerpanel driver,
|
|
||||||
and removed from the tree. The cyberpower driver may suffer the same in the
|
- nothing that affects upgraded systems.
|
||||||
future.
|
|
||||||
- The al175 and energizerups drivers have been removed from the tree, since
|
Changes from 2.2.2 to 2.4.0
|
||||||
these were tagged broken for a long time.
|
---------------------------
|
||||||
- Developers of external client application using libupsclient must rename
|
|
||||||
their "UPSCONN" client structure to "UPSCONN_t".
|
- The nut.conf file has been introduced to standardize startup configuration
|
||||||
- The upsd server will now disconnect clients that remain silent for more than
|
across the various systems.
|
||||||
60 seconds.
|
- The cpsups and nitram drivers have been replaced by the powerpanel driver,
|
||||||
- The files under scripts/python/client are distributed under GPL 3+, whereas
|
and removed from the tree. The cyberpower driver may suffer the same in the
|
||||||
the rest of the files are distributed under GPL 2+. Refer to COPYING for more
|
future.
|
||||||
information.
|
- The al175 and energizerups drivers have been removed from the tree, since
|
||||||
- The generated udev rules file has been renamed with dash only, no underscore
|
these were tagged broken for a long time.
|
||||||
anymore (ie 52-nut-usbups.rules instead of 52_nut-usbups.rules)
|
- Developers of external client application using libupsclient must rename
|
||||||
- (Note: this has been missed at release time): The NUT internal network access
|
their "UPSCONN" client structure to "UPSCONN_t".
|
||||||
control (ACL using ACCEPT / REJECT in upsd.conf) has been replaced by
|
- The upsd server will now disconnect clients that remain silent for more than
|
||||||
the LISTEN directive. This can also be complemented by tcp-wrappers.
|
60 seconds.
|
||||||
Refer to upsd and upsd.conf manual pages for more information.
|
- The files under scripts/python/client are distributed under GPL 3+, whereas
|
||||||
|
the rest of the files are distributed under GPL 2+. Refer to COPYING for more
|
||||||
---------------------------------------------------------------------------
|
information.
|
||||||
Changes from 2.2.1 to 2.2.2:
|
- The generated udev rules file has been renamed with dash only, no underscore
|
||||||
|
anymore (ie 52-nut-usbups.rules instead of 52_nut-usbups.rules)
|
||||||
- The configure option "--with-lib" has been replaced by "--with-dev".
|
|
||||||
This enable the additional build and distribution of the static
|
Changes from 2.2.1 to 2.2.2
|
||||||
version of libupsclient, along with the pkg-config helper and manual
|
---------------------------
|
||||||
pages. The default configure option is to distribute only the shared
|
|
||||||
version of libupsclient. This can be overriden by using the
|
- The configure option "--with-lib" has been replaced by "--with-dev".
|
||||||
"--disable-shared" configure option (distribute static only binaries).
|
This enable the additional build and distribution of the static
|
||||||
- The UPS poweroff handling of the usbhid-ups driver has been reworked.
|
version of libupsclient, along with the pkg-config helper and manual
|
||||||
Though regression is not expected, users of this driver are
|
pages. The default configure option is to distribute only the shared
|
||||||
encouraged to test this feature by calling "upsmon -c fsd" and
|
version of libupsclient. This can be overriden by using the
|
||||||
report any issue on the NUT mailing lists.
|
"--disable-shared" configure option (distribute static only binaries).
|
||||||
|
- The UPS poweroff handling of the usbhid-ups driver has been reworked.
|
||||||
---------------------------------------------------------------------------
|
Though regression is not expected, users of this driver are
|
||||||
Changes from 2.2.0 to 2.2.1:
|
encouraged to test this feature by calling "upsmon -c fsd" and
|
||||||
|
report any issue on the NUT mailing lists.
|
||||||
- nothing that affects upgraded systems.
|
|
||||||
(The below message is repetead due to previous omission)
|
Changes from 2.2.0 to 2.2.1
|
||||||
- Developers of external client application using libupsclient are
|
---------------------------
|
||||||
encouraged to rename their "UPSCONN" client structure to "UPSCONN_t"
|
|
||||||
since the former will disappear by the release of NUT 2.4.
|
- nothing that affects upgraded systems.
|
||||||
|
(The below message is repetead due to previous omission)
|
||||||
---------------------------------------------------------------------------
|
- Developers of external client application using libupsclient are
|
||||||
Changes from 2.0.5 to 2.2.0:
|
encouraged to rename their "UPSCONN" client structure to "UPSCONN_t"
|
||||||
|
since the former will disappear by the release of NUT 2.4.
|
||||||
- users of the newhidups driver are advised that the driver name has changed
|
|
||||||
to usbhid-ups.
|
Changes from 2.0.5 to 2.2.0
|
||||||
- users of the hidups driver must switch to usbhid-ups.
|
---------------------------
|
||||||
- users of the following drivers (powermust, blazer, fentonups, mustek,
|
|
||||||
esupssmart, ippon, sms) must switch to megatec, which replaces
|
- users of the newhidups driver are advised that the driver name has changed
|
||||||
all these drivers. Please refer to doc/megatec.txt for details.
|
to usbhid-ups.
|
||||||
- users of the mge-shut driver are encouraged to test newmge-shut, which
|
- users of the hidups driver must switch to usbhid-ups.
|
||||||
is an alternate driver scheduled to replace mge-shut,
|
- users of the following drivers (powermust, blazer, fentonups, mustek,
|
||||||
- users of the cpsups driver are encouraged to switch to powerpanel which
|
esupssmart, ippon, sms) must switch to megatec, which replaces
|
||||||
is scheduled to replace cpsups,
|
all these drivers. Please refer to doc/megatec.txt for details.
|
||||||
- packagers will have to rework the whole nut packaging due to the
|
- users of the mge-shut driver are encouraged to test newmge-shut, which
|
||||||
major changes in the build system (completely modified, and now using
|
is an alternate driver scheduled to replace mge-shut,
|
||||||
automake). Refer to packaging/debian/ for an example of migration.
|
- users of the cpsups driver are encouraged to switch to powerpanel which
|
||||||
- specifying '-a <id>' is now mandatory when starting a driver manually,
|
is scheduled to replace cpsups,
|
||||||
ie not using upsdrvctl.
|
- packagers will have to rework the whole nut packaging due to the
|
||||||
- Developers of external client application using libupsclient are
|
major changes in the build system (completely modified, and now using
|
||||||
encouraged to rename the "UPSCONN" client structure to "UPSCONN_t"
|
automake). Refer to packaging/debian/ for an example of migration.
|
||||||
since the former will disapear by the release of NUT 2.4.
|
- specifying '-a <id>' is now mandatory when starting a driver manually,
|
||||||
|
ie not using upsdrvctl.
|
||||||
---------------------------------------------------------------------------
|
- Developers of external client application using libupsclient are
|
||||||
Changes from 2.0.4 to 2.0.5:
|
encouraged to rename the "UPSCONN" client structure to "UPSCONN_t"
|
||||||
|
since the former will disapear by the release of NUT 2.4.
|
||||||
- users of the newhidups driver: the driver is now more strict about
|
|
||||||
refusing to connect to unknown devices. If your device was
|
Changes from 2.0.4 to 2.0.5
|
||||||
previously supported, but fails to be recognized now, add
|
---------------------------
|
||||||
'productid=XXXX' to ups.conf. Please report the device to the NUT
|
|
||||||
developer's mailing list.
|
- users of the newhidups driver: the driver is now more strict about
|
||||||
|
refusing to connect to unknown devices. If your device was
|
||||||
---------------------------------------------------------------------------
|
previously supported, but fails to be recognized now, add
|
||||||
Changes from 2.0.3 to 2.0.4:
|
'productid=XXXX' to ups.conf. Please report the device to the NUT
|
||||||
|
developer's mailing list.
|
||||||
- nothing that affects upgraded systems.
|
|
||||||
- users of the following drivers (powermust, blazer, fentonups, mustek,
|
Changes from 2.0.3 to 2.0.4
|
||||||
esupssmart, ippon, sms, masterguard) are encouraged to switch to megatec,
|
---------------------------
|
||||||
which should replace all these drivers by nut 2.2. For more information,
|
|
||||||
please refer to doc/megatec.txt
|
- nothing that affects upgraded systems.
|
||||||
|
- users of the following drivers (powermust, blazer, fentonups, mustek,
|
||||||
---------------------------------------------------------------------------
|
esupssmart, ippon, sms, masterguard) are encouraged to switch to megatec,
|
||||||
Changes from 2.0.2 to 2.0.3:
|
which should replace all these drivers by nut 2.2. For more information,
|
||||||
|
please refer to doc/megatec.txt
|
||||||
- nothing that affects upgraded systems.
|
|
||||||
- hidups users are encouraged to switch to newhidups, as hidups will be
|
Changes from 2.0.2 to 2.0.3
|
||||||
removed by nut 2.2.
|
---------------------------
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
- nothing that affects upgraded systems.
|
||||||
Changes from 2.0.1 to 2.0.2:
|
- hidups users are encouraged to switch to newhidups, as hidups will be
|
||||||
|
removed by nut 2.2.
|
||||||
- The newhidups driver, which is the long run USB support approach,
|
|
||||||
needs hotplug files installed to setup the right permissions on
|
Changes from 2.0.1 to 2.0.2
|
||||||
device file to operate. Check newhidups manual page for more information.
|
---------------------------
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
- The newhidups driver, which is the long run USB support approach,
|
||||||
Changes from 2.0.0 to 2.0.1:
|
needs hotplug files installed to setup the right permissions on
|
||||||
|
device file to operate. Check newhidups manual page for more information.
|
||||||
- The cyberpower1100 driver is now called cpsups since it supports
|
|
||||||
more than just one model. If you use this driver, be sure to remove
|
Changes from 2.0.0 to 2.0.1
|
||||||
the old binary and update your ups.conf 'driver=' setting with the
|
---------------------------
|
||||||
new name.
|
|
||||||
|
- The cyberpower1100 driver is now called cpsups since it supports
|
||||||
- The upsstats.html template page has been changed slightly to reflect
|
more than just one model. If you use this driver, be sure to remove
|
||||||
better HTML compliance, so you may want to update your installed copy
|
the old binary and update your ups.conf 'driver=' setting with the
|
||||||
accordingly. If you've customized your file, don't just copy the new
|
new name.
|
||||||
one over it, or your changes will be lost!
|
|
||||||
|
- The upsstats.html template page has been changed slightly to reflect
|
||||||
---------------------------------------------------------------------------
|
better HTML compliance, so you may want to update your installed copy
|
||||||
Changes from 1.4.0 to 2.0.0:
|
accordingly. If you've customized your file, don't just copy the new
|
||||||
|
one over it, or your changes will be lost!
|
||||||
- The sample config files are no longer installed by default. If you
|
|
||||||
want to install them, use 'make install-conf' for the main programs,
|
Changes from 1.4.0 to 2.0.0
|
||||||
and 'make install-cgi-conf' for the CGI programs.
|
---------------------------
|
||||||
|
|
||||||
- ACCESS is no longer supported in upsd.conf. Use ACCEPT and REJECT.
|
- The sample config files are no longer installed by default. If you
|
||||||
|
want to install them, use 'make install-conf' for the main programs,
|
||||||
|
and 'make install-cgi-conf' for the CGI programs.
|
||||||
|
|
||||||
|
- ACCESS is no longer supported in upsd.conf. Use ACCEPT and REJECT.
|
||||||
|
Old way:
|
||||||
|
|
||||||
|
ACCESS grant all adminbox
|
||||||
|
ACCESS grant all webserver
|
||||||
|
ACCESS deny all all
|
||||||
|
|
||||||
|
New way:
|
||||||
|
|
||||||
|
ACCEPT adminbox
|
||||||
|
ACCEPT webserver
|
||||||
|
REJECT all
|
||||||
|
|
||||||
|
Note that ACCEPT and REJECT can take multiple arguments, so this
|
||||||
|
will also work:
|
||||||
|
|
||||||
|
ACCEPT adminbox webserver
|
||||||
|
REJECT all
|
||||||
|
|
||||||
|
- The drivers no longer support sddelay in ups.conf or -d on the
|
||||||
|
command line. If you need a delay after calling 'upsdrvctl
|
||||||
|
shutdown', add a call to sleep in your shutdown script.
|
||||||
|
|
||||||
|
- The templates used by upsstats have changed considerably to reflect
|
||||||
|
the new variable names. If you use upsstats, you will need to
|
||||||
|
install new copies or edit your existing files to use the new names.
|
||||||
|
|
||||||
|
- Nobody needed UDP mode, so it has been removed. The only users
|
||||||
|
seemed to be a few people like me with ancient asapm-ups binaries.
|
||||||
|
If you really want to run asapm-ups again, bug me for the new patch
|
||||||
|
which makes it work with upsclient.
|
||||||
|
|
||||||
|
- 'make install-misc' is now 'make install-lib'. The misc directory
|
||||||
|
has been gone for a long time, and the target was ambiguous.
|
||||||
|
>>>>>>> switch UPGRADING information to AsciiDoc, and integrate these in the User Manual.
|
||||||
|
|
||||||
Old way:
|
- The newapc driver has been renamed to apcsmart. If you previously
|
||||||
|
used newapc, make sure you delete the old binary and fix your
|
||||||
|
ups.conf. Otherwise, you may run the old driver from 1.4.
|
||||||
|
|
||||||
ACCESS grant all adminbox
|
|
||||||
ACCESS grant all webserver
|
|
||||||
ACCESS deny all all
|
|
||||||
|
|
||||||
New way:
|
*** File trimmed here on changes from 1.2.2 to 1.4.0 ***
|
||||||
|
|
||||||
ACCEPT adminbox
|
For information before this point, start with version 2.4.1 and work back.
|
||||||
ACCEPT webserver
|
|
||||||
REJECT all
|
|
||||||
|
|
||||||
Note that ACCEPT and REJECT can take multiple arguments, so this
|
|
||||||
will also work:
|
|
||||||
|
|
||||||
ACCEPT adminbox webserver
|
|
||||||
REJECT all
|
|
||||||
|
|
||||||
- The drivers no longer support sddelay in ups.conf or -d on the
|
|
||||||
command line. If you need a delay after calling 'upsdrvctl
|
|
||||||
shutdown', add a call to sleep in your shutdown script.
|
|
||||||
|
|
||||||
- The templates used by upsstats have changed considerably to reflect
|
|
||||||
the new variable names. If you use upsstats, you will need to
|
|
||||||
install new copies or edit your existing files to use the new names.
|
|
||||||
|
|
||||||
- Nobody needed UDP mode, so it has been removed. The only users
|
|
||||||
seemed to be a few people like me with ancient asapm-ups binaries.
|
|
||||||
If you really want to run asapm-ups again, bug me for the new patch
|
|
||||||
which makes it work with upsclient.
|
|
||||||
|
|
||||||
- 'make install-misc' is now 'make install-lib'. The misc directory
|
|
||||||
has been gone for a long time, and the target was ambiguous.
|
|
||||||
|
|
||||||
- The newapc driver has been renamed to apcsmart. If you previously
|
|
||||||
used newapc, make sure you delete the old binary and fix your
|
|
||||||
ups.conf. Otherwise, you may run the old driver from 1.4.
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Changes from 1.2.2 to 1.4.0:
|
|
||||||
|
|
||||||
- The clients no longer support the notion of a "default UPS" when
|
|
||||||
communicating with newer versions of upsd. If you leave off a UPS
|
|
||||||
name, they will fall back on compatibility mode and will use the
|
|
||||||
old variable and command names.
|
|
||||||
|
|
||||||
That is, "upsc localhost" will give you things like STATUS, and you
|
|
||||||
have to do "upsc myups@localhost" to get the new ones like
|
|
||||||
ups.status.
|
|
||||||
|
|
||||||
The old variable names and default UPS mode will be supported
|
|
||||||
throughout the 1.4 series to allow users to convert to the new
|
|
||||||
style. This support will be formally dropped in 2.0.
|
|
||||||
|
|
||||||
- upsmon is part of the "no default upsname" change. You must change
|
|
||||||
the MONITOR directives in your upsmon.conf if you were using this
|
|
||||||
technique before.
|
|
||||||
|
|
||||||
Old way:
|
|
||||||
|
|
||||||
MONITOR bigserver 1 monuser password master
|
|
||||||
|
|
||||||
New way:
|
|
||||||
|
|
||||||
MONITOR myups@bigserver 1 monuser password master
|
|
||||||
|
|
||||||
Just look at the top of ups.conf on 'bigserver' to figure out what
|
|
||||||
the first UPS is called, and stick it and a @ on that MONITOR line.
|
|
||||||
|
|
||||||
- upsrw's appearance has changed to avoid wrapping when displaying
|
|
||||||
the new longer variable names and descriptions. It still displays
|
|
||||||
the old format when talking to an older upsd.
|
|
||||||
|
|
||||||
To see the difference, try "upsrw localhost" and then compare it to
|
|
||||||
"upsrw myups@localhost", assuming a new version of upsd is running
|
|
||||||
on localhost.
|
|
||||||
|
|
||||||
- upslog now uses the new variable names in the default format
|
|
||||||
string. It will still monitor the old variable names for backwards
|
|
||||||
compatibility, but you will have to specify the format string
|
|
||||||
explicitly.
|
|
||||||
|
|
||||||
- 'make install' no longer creates the state path. Instructions for
|
|
||||||
creating it properly have been added to the INSTALL file.
|
|
||||||
|
|
||||||
Technically, this only affects packagers, since this is the
|
|
||||||
UPGRADING file and normal users should already have a state path.
|
|
||||||
If you are a packager, you will need to add the right mkdir + chown +
|
|
||||||
chmod magic to your install process to keep things working.
|
|
||||||
|
|
||||||
This also means that you no longer need any special permissions to
|
|
||||||
bundle this software into a package. The installer no longer
|
|
||||||
requires root now that the chown is gone.
|
|
||||||
|
|
||||||
- configure --with-group no longer does anything useful. The programs
|
|
||||||
which will drop permissions support "-u <user>", and will pick up
|
|
||||||
the group id based on the values in /etc/passwd for that user name.
|
|
||||||
|
|
||||||
configure --with-user still works as before, and provides the default
|
|
||||||
value if you don't specify another one with -u.
|
|
||||||
|
|
||||||
- The "DROP" action in upsd.conf now behaves a little differently.
|
|
||||||
|
|
||||||
It still causes new TCP connections to be closed without reading
|
|
||||||
from the socket, and still causes UDP datagrams to be ignored.
|
|
||||||
|
|
||||||
The only difference is that commands that are denied after the
|
|
||||||
remote host connects will now generate an error message. Previously,
|
|
||||||
upsd would just ignore them, and the clients could get out of sync.
|
|
||||||
|
|
||||||
DENY also has been changed slightly to silently ignore UDP packets.
|
|
||||||
|
|
||||||
Essentially, DROP and DENY are now the same thing. If you use DROP
|
|
||||||
anywhere, you should change to DENY before it goes away in the future.
|
|
||||||
|
|
||||||
- upsmon now requires a username on the MONITOR lines. If you have an
|
|
||||||
older installation from the 1.x era or earlier, you probably need
|
|
||||||
to convert them.
|
|
||||||
|
|
||||||
Old way: MONITOR ups@mybox 1 mypass master
|
|
||||||
New way: MONITOR ups@mybox 1 username mypass master
|
|
||||||
|
|
||||||
You will also have to add a [username] section to the upsd.users
|
|
||||||
with a matching password, an allowfrom value, and "upsmon master" or
|
|
||||||
"upsmon slave".
|
|
||||||
|
|
||||||
If upsmon says the login failed due to "username required" or fails to
|
|
||||||
start, saying "Unable to use old-style MONITOR line without a username",
|
|
||||||
then you're still using the old method.
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Changes from 1.2.1 to 1.2.2:
|
|
||||||
|
|
||||||
- upssched.conf now requires the LOCKFN directive to prevent races when
|
|
||||||
handling two events that happen at nearly the same time.
|
|
||||||
|
|
||||||
If you use upssched, you must add this to your upssched.conf or it
|
|
||||||
will fail to run.
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Changes from 1.0.0 to 1.2.0:
|
|
||||||
|
|
||||||
- upsct is gone. upsc now uses the new upsclient library which is
|
|
||||||
TCP only, so there is no need for a separate client for TCP polling.
|
|
||||||
|
|
||||||
- upsct2 has been renamed to upsrw since the name was already
|
|
||||||
ambiguous and it looked even more out of place with upsct gone.
|
|
||||||
|
|
||||||
- The multimon.cgi behavior has been absorbed into upsstats.cgi.
|
|
||||||
|
|
||||||
- Calling upsstats.cgi with no arguments will make it render
|
|
||||||
the template file called upsstats.html in your confpath. The default
|
|
||||||
version of this file looks a lot like multimon, but is flexible.
|
|
||||||
You will have to copy this file from upsstats.html.sample to
|
|
||||||
upsstats.html the first time you install this version.
|
|
||||||
|
|
||||||
- Calling upsstats.cgi with host= set will still render a single status
|
|
||||||
page as before, but the markup for that page now comes from
|
|
||||||
upsstats-single.html. This is also a template and may be
|
|
||||||
reconfigured to suit your needs. It must also be copied over from
|
|
||||||
the .sample filename the first time.
|
|
||||||
|
|
||||||
- upsmon can now send a username when authenticating to upsd. It is
|
|
||||||
recommended that you change to this mode, as the old host-based
|
|
||||||
authentication is clunky and eventually will be removed.
|
|
||||||
|
|
||||||
Old way:
|
|
||||||
|
|
||||||
MONITOR myups@bigserver 1 blah master
|
|
||||||
|
|
||||||
New way:
|
|
||||||
|
|
||||||
MONITOR myups@bigserver 1 monmaster blah master
|
|
||||||
|
|
||||||
Note that the username has been inserted between the power value and
|
|
||||||
the password. When switching to this method, be sure to add a user
|
|
||||||
to upsd.users, i.e.:
|
|
||||||
|
|
||||||
[monmaster]
|
|
||||||
password = blah
|
|
||||||
allowfrom = localhost
|
|
||||||
upsmon master
|
|
||||||
|
|
||||||
You still need to give the upsmon host(s) at least "monitor" access,
|
|
||||||
so don't delete those old ACCESS lines in your upsd.conf. Just
|
|
||||||
lower the access level and remove the password.
|
|
||||||
|
|
||||||
Old way:
|
|
||||||
|
|
||||||
ACCESS grant master localhost blah
|
|
||||||
|
|
||||||
New way:
|
|
||||||
|
|
||||||
ACCESS grant monitor localhost
|
|
||||||
|
|
||||||
- The old upsfetch "library" (used loosely) has been replaced by
|
|
||||||
upsclient. This will be installed if you do "make install-misc",
|
|
||||||
but it goes into $(prefix)/lib and $(prefix)/include by default.
|
|
||||||
|
|
||||||
The upsclient interface is not compatible with upsfetch. Old
|
|
||||||
accessory programs which linked to upsfetch will have to be updated
|
|
||||||
to work with upsclient instead.
|
|
||||||
|
|
||||||
Existing binaries that were linked against upsfetch will still work
|
|
||||||
since the network protocol used by upsd has not changed.
|
|
||||||
|
|
||||||
- SET and INSTCMD no longer work via host-level authentication. This
|
|
||||||
is only a meaningful change if you are using very old versions of
|
|
||||||
upscmd/upsct2/upsset.cgi, or if you're talking to upsd directly.
|
|
||||||
|
|
||||||
You must now set a USERNAME first, and authentication will occur
|
|
||||||
through upsd.users as a result.
|
|
||||||
|
|
||||||
This means that the "manager" level in upsd.conf ACCESS directives
|
|
||||||
is no longer meaningful, and you should remove them.
|
|
||||||
|
|
||||||
- INSTALLROOT is no longer available for redirecting 'make install' -
|
|
||||||
use DESTDIR instead.
|
|
||||||
|
|
||||||
- Makefile targets have been reworked to allow fine-grained control
|
|
||||||
over what happens at install-time. 'make install' and 'make
|
|
||||||
install-cgi' still do everything, but you can call subsets instead
|
|
||||||
if necessary. See ChangeLog.
|
|
||||||
|
|
14
aclocal.m4
vendored
|
@ -1,4 +1,4 @@
|
||||||
# generated automatically by aclocal 1.11 -*- Autoconf -*-
|
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||||
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
|
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
|
||||||
[m4_warning([this file was generated for autoconf 2.64.
|
[m4_warning([this file was generated for autoconf 2.65.
|
||||||
You have another version of autoconf. It may work, but is not guaranteed to.
|
You have another version of autoconf. It may work, but is not guaranteed to.
|
||||||
If you have problems, you may need to regenerate the build system entirely.
|
If you have problems, you may need to regenerate the build system entirely.
|
||||||
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
||||||
|
@ -144,7 +144,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||||
[am__api_version='1.11'
|
[am__api_version='1.11'
|
||||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||||
dnl require some minimum version. Point them to the right macro.
|
dnl require some minimum version. Point them to the right macro.
|
||||||
m4_if([$1], [1.11], [],
|
m4_if([$1], [1.11.1], [],
|
||||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
|
||||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||||
[AM_AUTOMAKE_VERSION([1.11])dnl
|
[AM_AUTOMAKE_VERSION([1.11.1])dnl
|
||||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||||
|
@ -1134,6 +1134,7 @@ AC_SUBST([am__tar])
|
||||||
AC_SUBST([am__untar])
|
AC_SUBST([am__untar])
|
||||||
]) # _AM_PROG_TAR
|
]) # _AM_PROG_TAR
|
||||||
|
|
||||||
|
m4_include([m4/ax_compare_version.m4])
|
||||||
m4_include([m4/ax_create_stdint_h.m4])
|
m4_include([m4/ax_create_stdint_h.m4])
|
||||||
m4_include([m4/libtool.m4])
|
m4_include([m4/libtool.m4])
|
||||||
m4_include([m4/ltoptions.m4])
|
m4_include([m4/ltoptions.m4])
|
||||||
|
@ -1141,7 +1142,7 @@ m4_include([m4/ltsugar.m4])
|
||||||
m4_include([m4/ltversion.m4])
|
m4_include([m4/ltversion.m4])
|
||||||
m4_include([m4/lt~obsolete.m4])
|
m4_include([m4/lt~obsolete.m4])
|
||||||
m4_include([m4/nut_arg_with.m4])
|
m4_include([m4/nut_arg_with.m4])
|
||||||
m4_include([m4/nut_check_ipv6.m4])
|
m4_include([m4/nut_check_asciidoc.m4])
|
||||||
m4_include([m4/nut_check_libgd.m4])
|
m4_include([m4/nut_check_libgd.m4])
|
||||||
m4_include([m4/nut_check_libhal.m4])
|
m4_include([m4/nut_check_libhal.m4])
|
||||||
m4_include([m4/nut_check_libneon.m4])
|
m4_include([m4/nut_check_libneon.m4])
|
||||||
|
@ -1151,5 +1152,6 @@ m4_include([m4/nut_check_libssl.m4])
|
||||||
m4_include([m4/nut_check_libusb.m4])
|
m4_include([m4/nut_check_libusb.m4])
|
||||||
m4_include([m4/nut_check_libwrap.m4])
|
m4_include([m4/nut_check_libwrap.m4])
|
||||||
m4_include([m4/nut_check_os.m4])
|
m4_include([m4/nut_check_os.m4])
|
||||||
|
m4_include([m4/nut_config_libhal.m4])
|
||||||
m4_include([m4/nut_report_feature.m4])
|
m4_include([m4/nut_report_feature.m4])
|
||||||
m4_include([m4/nut_type_socklen_t.m4])
|
m4_include([m4/nut_type_socklen_t.m4])
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# Network UPS Tools: clients
|
# Network UPS Tools: clients
|
||||||
|
|
||||||
# by default, link programs in this directory with libcommon.a
|
# by default, link programs in this directory with libcommon.a
|
||||||
LDADD = ../common/libcommon.a libupsclient.la $(NETLIBS)
|
LDADD = ../common/libcommon.la libupsclient.la $(NETLIBS)
|
||||||
if WITH_SSL
|
if WITH_SSL
|
||||||
LDADD += $(LIBSSL_LDFLAGS)
|
LDADD += $(LIBSSL_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Avoid per-target CFLAGS, because this will prevent re-use of object
|
# Avoid per-target CFLAGS, because this will prevent re-use of object
|
||||||
|
@ -35,7 +35,7 @@ upslog_SOURCES = upslog.c upsclient.h upslog.h
|
||||||
upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
|
upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
|
||||||
|
|
||||||
upssched_SOURCES = upssched.c upssched.h
|
upssched_SOURCES = upssched.c upssched.h
|
||||||
upssched_LDADD = ../common/libcommon.a ../common/libparseconf.la $(NETLIBS)
|
upssched_LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS)
|
||||||
|
|
||||||
upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h
|
upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h
|
||||||
upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS)
|
upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS)
|
||||||
|
@ -48,6 +48,6 @@ upsstats_cgi_SOURCES = upsstats.c upsclient.h status.h upsstats.h \
|
||||||
libupsclient_la_SOURCES = upsclient.c upsclient.h
|
libupsclient_la_SOURCES = upsclient.c upsclient.h
|
||||||
libupsclient_la_LIBADD = ../common/libparseconf.la
|
libupsclient_la_LIBADD = ../common/libparseconf.la
|
||||||
if WITH_SSL
|
if WITH_SSL
|
||||||
libupsclient_la_LIBADD += $(LIBSSL_LDFLAGS)
|
libupsclient_la_LIBADD += $(LIBSSL_LIBS)
|
||||||
endif
|
endif
|
||||||
libupsclient_la_LDFLAGS = -version-info 1:0:0
|
libupsclient_la_LDFLAGS = -version-info 1:0:0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
@ -40,7 +40,7 @@ POST_UNINSTALL = :
|
||||||
build_triplet = @build@
|
build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
target_triplet = @target@
|
target_triplet = @target@
|
||||||
@WITH_SSL_TRUE@am__append_1 = $(LIBSSL_LDFLAGS)
|
@WITH_SSL_TRUE@am__append_1 = $(LIBSSL_LIBS)
|
||||||
@WITH_SSL_TRUE@am__append_2 = $(LIBSSL_CFLAGS)
|
@WITH_SSL_TRUE@am__append_2 = $(LIBSSL_CFLAGS)
|
||||||
@WITH_CGI_TRUE@am__append_3 = $(LIBGD_CFLAGS)
|
@WITH_CGI_TRUE@am__append_3 = $(LIBGD_CFLAGS)
|
||||||
bin_PROGRAMS = upsc$(EXEEXT) upslog$(EXEEXT) upsrw$(EXEEXT) \
|
bin_PROGRAMS = upsc$(EXEEXT) upslog$(EXEEXT) upsrw$(EXEEXT) \
|
||||||
|
@ -48,17 +48,18 @@ bin_PROGRAMS = upsc$(EXEEXT) upslog$(EXEEXT) upsrw$(EXEEXT) \
|
||||||
sbin_PROGRAMS = upsmon$(EXEEXT) upssched$(EXEEXT)
|
sbin_PROGRAMS = upsmon$(EXEEXT) upssched$(EXEEXT)
|
||||||
@WITH_CGI_TRUE@cgiexec_PROGRAMS = upsstats.cgi$(EXEEXT) \
|
@WITH_CGI_TRUE@cgiexec_PROGRAMS = upsstats.cgi$(EXEEXT) \
|
||||||
@WITH_CGI_TRUE@ upsimage.cgi$(EXEEXT) upsset.cgi$(EXEEXT)
|
@WITH_CGI_TRUE@ upsimage.cgi$(EXEEXT) upsset.cgi$(EXEEXT)
|
||||||
@WITH_SSL_TRUE@am__append_4 = $(LIBSSL_LDFLAGS)
|
@WITH_SSL_TRUE@am__append_4 = $(LIBSSL_LIBS)
|
||||||
subdir = clients
|
subdir = clients
|
||||||
DIST_COMMON = $(am__include_HEADERS_DIST) $(dist_bin_SCRIPTS) \
|
DIST_COMMON = $(am__include_HEADERS_DIST) $(dist_bin_SCRIPTS) \
|
||||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_ipv6.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
|
@ -68,6 +69,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
|
$(top_srcdir)/m4/nut_config_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.in
|
$(top_srcdir)/configure.in
|
||||||
|
@ -115,47 +117,47 @@ PROGRAMS = $(bin_PROGRAMS) $(cgiexec_PROGRAMS) $(sbin_PROGRAMS)
|
||||||
am_upsc_OBJECTS = upsc.$(OBJEXT)
|
am_upsc_OBJECTS = upsc.$(OBJEXT)
|
||||||
upsc_OBJECTS = $(am_upsc_OBJECTS)
|
upsc_OBJECTS = $(am_upsc_OBJECTS)
|
||||||
upsc_LDADD = $(LDADD)
|
upsc_LDADD = $(LDADD)
|
||||||
upsc_DEPENDENCIES = ../common/libcommon.a libupsclient.la \
|
upsc_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
am_upscmd_OBJECTS = upscmd.$(OBJEXT)
|
am_upscmd_OBJECTS = upscmd.$(OBJEXT)
|
||||||
upscmd_OBJECTS = $(am_upscmd_OBJECTS)
|
upscmd_OBJECTS = $(am_upscmd_OBJECTS)
|
||||||
upscmd_LDADD = $(LDADD)
|
upscmd_LDADD = $(LDADD)
|
||||||
upscmd_DEPENDENCIES = ../common/libcommon.a libupsclient.la \
|
upscmd_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
am_upsimage_cgi_OBJECTS = upsimage.$(OBJEXT) cgilib.$(OBJEXT)
|
am_upsimage_cgi_OBJECTS = upsimage.$(OBJEXT) cgilib.$(OBJEXT)
|
||||||
upsimage_cgi_OBJECTS = $(am_upsimage_cgi_OBJECTS)
|
upsimage_cgi_OBJECTS = $(am_upsimage_cgi_OBJECTS)
|
||||||
am__DEPENDENCIES_3 = ../common/libcommon.a libupsclient.la \
|
am__DEPENDENCIES_3 = ../common/libcommon.la libupsclient.la \
|
||||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
upsimage_cgi_DEPENDENCIES = $(am__DEPENDENCIES_3) \
|
upsimage_cgi_DEPENDENCIES = $(am__DEPENDENCIES_3) \
|
||||||
$(am__DEPENDENCIES_1)
|
$(am__DEPENDENCIES_1)
|
||||||
am_upslog_OBJECTS = upslog.$(OBJEXT)
|
am_upslog_OBJECTS = upslog.$(OBJEXT)
|
||||||
upslog_OBJECTS = $(am_upslog_OBJECTS)
|
upslog_OBJECTS = $(am_upslog_OBJECTS)
|
||||||
upslog_LDADD = $(LDADD)
|
upslog_LDADD = $(LDADD)
|
||||||
upslog_DEPENDENCIES = ../common/libcommon.a libupsclient.la \
|
upslog_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
am_upsmon_OBJECTS = upsmon.$(OBJEXT)
|
am_upsmon_OBJECTS = upsmon.$(OBJEXT)
|
||||||
upsmon_OBJECTS = $(am_upsmon_OBJECTS)
|
upsmon_OBJECTS = $(am_upsmon_OBJECTS)
|
||||||
upsmon_LDADD = $(LDADD)
|
upsmon_LDADD = $(LDADD)
|
||||||
upsmon_DEPENDENCIES = ../common/libcommon.a libupsclient.la \
|
upsmon_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
am_upsrw_OBJECTS = upsrw.$(OBJEXT)
|
am_upsrw_OBJECTS = upsrw.$(OBJEXT)
|
||||||
upsrw_OBJECTS = $(am_upsrw_OBJECTS)
|
upsrw_OBJECTS = $(am_upsrw_OBJECTS)
|
||||||
upsrw_LDADD = $(LDADD)
|
upsrw_LDADD = $(LDADD)
|
||||||
upsrw_DEPENDENCIES = ../common/libcommon.a libupsclient.la \
|
upsrw_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
am_upssched_OBJECTS = upssched.$(OBJEXT)
|
am_upssched_OBJECTS = upssched.$(OBJEXT)
|
||||||
upssched_OBJECTS = $(am_upssched_OBJECTS)
|
upssched_OBJECTS = $(am_upssched_OBJECTS)
|
||||||
upssched_DEPENDENCIES = ../common/libcommon.a \
|
upssched_DEPENDENCIES = ../common/libcommon.la \
|
||||||
../common/libparseconf.la $(am__DEPENDENCIES_1)
|
../common/libparseconf.la $(am__DEPENDENCIES_1)
|
||||||
am_upsset_cgi_OBJECTS = upsset.$(OBJEXT) cgilib.$(OBJEXT)
|
am_upsset_cgi_OBJECTS = upsset.$(OBJEXT) cgilib.$(OBJEXT)
|
||||||
upsset_cgi_OBJECTS = $(am_upsset_cgi_OBJECTS)
|
upsset_cgi_OBJECTS = $(am_upsset_cgi_OBJECTS)
|
||||||
upsset_cgi_LDADD = $(LDADD)
|
upsset_cgi_LDADD = $(LDADD)
|
||||||
upsset_cgi_DEPENDENCIES = ../common/libcommon.a libupsclient.la \
|
upsset_cgi_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
am_upsstats_cgi_OBJECTS = upsstats.$(OBJEXT) cgilib.$(OBJEXT)
|
am_upsstats_cgi_OBJECTS = upsstats.$(OBJEXT) cgilib.$(OBJEXT)
|
||||||
upsstats_cgi_OBJECTS = $(am_upsstats_cgi_OBJECTS)
|
upsstats_cgi_OBJECTS = $(am_upsstats_cgi_OBJECTS)
|
||||||
upsstats_cgi_LDADD = $(LDADD)
|
upsstats_cgi_LDADD = $(LDADD)
|
||||||
upsstats_cgi_DEPENDENCIES = ../common/libcommon.a libupsclient.la \
|
upsstats_cgi_DEPENDENCIES = ../common/libcommon.la libupsclient.la \
|
||||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
|
||||||
SCRIPTS = $(dist_bin_SCRIPTS)
|
SCRIPTS = $(dist_bin_SCRIPTS)
|
||||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
|
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include
|
||||||
|
@ -184,9 +186,11 @@ HEADERS = $(include_HEADERS)
|
||||||
ETAGS = etags
|
ETAGS = etags
|
||||||
CTAGS = ctags
|
CTAGS = ctags
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
A2X = @A2X@
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
|
ASCIIDOC = @ASCIIDOC@
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -199,8 +203,10 @@ CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DBLATEX = @DBLATEX@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -217,7 +223,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@
|
||||||
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
||||||
HAL_FDI_PATH = @HAL_FDI_PATH@
|
HAL_FDI_PATH = @HAL_FDI_PATH@
|
||||||
HAL_USER = @HAL_USER@
|
HAL_USER = @HAL_USER@
|
||||||
HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
@ -228,22 +233,22 @@ LDFLAGS = @LDFLAGS@
|
||||||
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
||||||
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
||||||
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
||||||
LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@
|
LIBHAL_LIBS = @LIBHAL_LIBS@
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@
|
LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
||||||
LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@
|
LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
@ -341,7 +346,7 @@ top_srcdir = @top_srcdir@
|
||||||
udevdir = @udevdir@
|
udevdir = @udevdir@
|
||||||
|
|
||||||
# by default, link programs in this directory with libcommon.a
|
# by default, link programs in this directory with libcommon.a
|
||||||
LDADD = ../common/libcommon.a libupsclient.la $(NETLIBS) \
|
LDADD = ../common/libcommon.la libupsclient.la $(NETLIBS) \
|
||||||
$(am__append_1)
|
$(am__append_1)
|
||||||
|
|
||||||
# Avoid per-target CFLAGS, because this will prevent re-use of object
|
# Avoid per-target CFLAGS, because this will prevent re-use of object
|
||||||
|
@ -357,7 +362,7 @@ upsrw_SOURCES = upsrw.c upsclient.h
|
||||||
upslog_SOURCES = upslog.c upsclient.h upslog.h
|
upslog_SOURCES = upslog.c upsclient.h upslog.h
|
||||||
upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
|
upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
|
||||||
upssched_SOURCES = upssched.c upssched.h
|
upssched_SOURCES = upssched.c upssched.h
|
||||||
upssched_LDADD = ../common/libcommon.a ../common/libparseconf.la $(NETLIBS)
|
upssched_LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS)
|
||||||
upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h
|
upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h
|
||||||
upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS)
|
upsimage_cgi_LDADD = $(LDADD) $(LIBGD_LDFLAGS)
|
||||||
upsset_cgi_SOURCES = upsset.c upsclient.h cgilib.c cgilib.h
|
upsset_cgi_SOURCES = upsset.c upsclient.h cgilib.c cgilib.h
|
||||||
|
|
|
@ -298,6 +298,11 @@ int upscli_sslcert(UPSCONN_t *ups, const char *dir, const char *file, int verify
|
||||||
|
|
||||||
static int upscli_sslinit(UPSCONN_t *ups)
|
static int upscli_sslinit(UPSCONN_t *ups)
|
||||||
{
|
{
|
||||||
|
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||||
|
const SSL_METHOD *ssl_method;
|
||||||
|
#else
|
||||||
|
SSL_METHOD *ssl_method;
|
||||||
|
#endif
|
||||||
char buf[UPSCLI_NETBUF_LEN];
|
char buf[UPSCLI_NETBUF_LEN];
|
||||||
|
|
||||||
/* see if upsd even talks SSL/TLS */
|
/* see if upsd even talks SSL/TLS */
|
||||||
|
@ -317,10 +322,16 @@ static int upscli_sslinit(UPSCONN_t *ups)
|
||||||
|
|
||||||
/* upsd is happy, so let's crank up the client */
|
/* upsd is happy, so let's crank up the client */
|
||||||
|
|
||||||
SSL_library_init();
|
|
||||||
SSL_load_error_strings();
|
SSL_load_error_strings();
|
||||||
|
SSL_library_init();
|
||||||
|
|
||||||
ups->ssl_ctx = SSL_CTX_new(TLSv1_client_method());
|
ssl_method = TLSv1_client_method();
|
||||||
|
|
||||||
|
if (!ssl_method) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ups->ssl_ctx = SSL_CTX_new(ssl_method);
|
||||||
|
|
||||||
if (!ups->ssl_ctx) {
|
if (!ups->ssl_ctx) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -385,14 +396,9 @@ int upscli_sslcert(UPSCONN_t *ups, const char *file, const char *path, int verif
|
||||||
int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags)
|
int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags)
|
||||||
{
|
{
|
||||||
int sock_fd;
|
int sock_fd;
|
||||||
#ifndef HAVE_IPV6
|
|
||||||
struct sockaddr_in local, server;
|
|
||||||
struct hostent *serv;
|
|
||||||
#else
|
|
||||||
struct addrinfo hints, *res, *ai;
|
struct addrinfo hints, *res, *ai;
|
||||||
char sport[NI_MAXSERV];
|
char sport[NI_MAXSERV];
|
||||||
int v;
|
int v;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!ups) {
|
if (!ups) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -408,58 +414,6 @@ int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_IPV6
|
|
||||||
serv = gethostbyname(host);
|
|
||||||
|
|
||||||
if (!serv) {
|
|
||||||
struct in_addr listenaddr;
|
|
||||||
|
|
||||||
if (!inet_aton(host, &listenaddr)) {
|
|
||||||
ups->upserror = UPSCLI_ERR_NOSUCHHOST;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
serv = gethostbyaddr(&listenaddr, sizeof(listenaddr), AF_INET);
|
|
||||||
|
|
||||||
if (!serv) {
|
|
||||||
ups->upserror = UPSCLI_ERR_NOSUCHHOST;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((sock_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
|
|
||||||
ups->upserror = UPSCLI_ERR_SOCKFAILURE;
|
|
||||||
ups->syserrno = errno;
|
|
||||||
close(sock_fd);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&local, '\0', sizeof(local));
|
|
||||||
local.sin_family = AF_INET;
|
|
||||||
local.sin_port = htons(INADDR_ANY);
|
|
||||||
|
|
||||||
memset(&server, '\0', sizeof(server));
|
|
||||||
server.sin_family = AF_INET;
|
|
||||||
server.sin_port = htons(port);
|
|
||||||
|
|
||||||
memcpy(&server.sin_addr, serv->h_addr, serv->h_length);
|
|
||||||
|
|
||||||
if (bind(sock_fd, (struct sockaddr *) &local, sizeof(local)) < 0) {
|
|
||||||
ups->upserror = UPSCLI_ERR_BINDFAILURE;
|
|
||||||
ups->syserrno = errno;
|
|
||||||
close(sock_fd);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (connect(sock_fd, (struct sockaddr *) &server, sizeof(struct sockaddr_in)) < 0) {
|
|
||||||
ups->upserror = UPSCLI_ERR_CONNFAILURE;
|
|
||||||
ups->syserrno = errno;
|
|
||||||
close(sock_fd);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ups->fd = sock_fd;
|
|
||||||
#else
|
|
||||||
snprintf(sport, sizeof(sport), "%hu", (unsigned short int)port);
|
snprintf(sport, sizeof(sport), "%hu", (unsigned short int)port);
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
memset(&hints, 0, sizeof(hints));
|
||||||
|
@ -543,7 +497,7 @@ int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags)
|
||||||
if (ups->fd < 0) {
|
if (ups->fd < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
pconf_init(&ups->pc_ctx, NULL);
|
pconf_init(&ups->pc_ctx, NULL);
|
||||||
|
|
||||||
ups->host = strdup(host);
|
ups->host = strdup(host);
|
||||||
|
|
|
@ -26,7 +26,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
/* *INDENT-OFF* */
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
/* *INDENT-ON* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define UPSCLI_ERRBUF_LEN 256
|
#define UPSCLI_ERRBUF_LEN 256
|
||||||
|
@ -154,13 +156,12 @@ int upscli_ssl(UPSCONN_t *ups);
|
||||||
|
|
||||||
#define UPSCLI_CONN_TRYSSL 0x0001 /* try SSL, OK if not supported */
|
#define UPSCLI_CONN_TRYSSL 0x0001 /* try SSL, OK if not supported */
|
||||||
#define UPSCLI_CONN_REQSSL 0x0002 /* try SSL, fail if not supported */
|
#define UPSCLI_CONN_REQSSL 0x0002 /* try SSL, fail if not supported */
|
||||||
#ifdef HAVE_IPV6
|
|
||||||
#define UPSCLI_CONN_INET 0x0004 /* IPv4 only */
|
#define UPSCLI_CONN_INET 0x0004 /* IPv4 only */
|
||||||
#define UPSCLI_CONN_INET6 0x0008 /* IPv6 only */
|
#define UPSCLI_CONN_INET6 0x0008 /* IPv6 only */
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
/* *INDENT-OFF* */
|
||||||
}
|
}
|
||||||
|
/* *INDENT-ON* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* UPSCLIENT_H_SEEN */
|
#endif /* UPSCLIENT_H_SEEN */
|
||||||
|
|
|
@ -152,6 +152,13 @@ static void do_cmd(char **argv, const int argc)
|
||||||
if (upscli_readline(ups, buf, sizeof(buf)) < 0) {
|
if (upscli_readline(ups, buf, sizeof(buf)) < 0) {
|
||||||
fatalx(EXIT_FAILURE, "Instant command failed: %s", upscli_strerror(ups));
|
fatalx(EXIT_FAILURE, "Instant command failed: %s", upscli_strerror(ups));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FUTURE: status cookies will tie in here */
|
||||||
|
if (strncmp(buf, "OK", 2) != 0) {
|
||||||
|
fatalx(EXIT_FAILURE, "Unexpected response from upsd: %s", buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(stderr, "%s\n", buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clean_exit(void)
|
static void clean_exit(void)
|
||||||
|
|
|
@ -620,7 +620,7 @@ int main(int argc, char **argv)
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct imgvar_t imgvar[] = {
|
imgvar_t imgvar[] = {
|
||||||
{ "input.voltage", "input.transfer.low", "input.voltage.nominal",
|
{ "input.voltage", "input.transfer.low", "input.voltage.nominal",
|
||||||
"input.transfer.high", 0,
|
"input.transfer.high", 0,
|
||||||
"%.1f VAC", draw_utility },
|
"%.1f VAC", draw_utility },
|
||||||
|
|
|
@ -44,7 +44,7 @@ struct {
|
||||||
{ NULL, 0, 0, 0 }
|
{ NULL, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct imgvar_t {
|
typedef struct {
|
||||||
char *name; /* name of the UPS variable */
|
char *name; /* name of the UPS variable */
|
||||||
char *minimum; /* name of minimum value UPS variable
|
char *minimum; /* name of minimum value UPS variable
|
||||||
or variable in imgarg table */
|
or variable in imgarg table */
|
||||||
|
@ -55,6 +55,6 @@ struct imgvar_t {
|
||||||
|
|
||||||
/* pointer to drawing function */
|
/* pointer to drawing function */
|
||||||
void (*drawfunc)(double, int, int, int, int, const char*);
|
void (*drawfunc)(double, int, int, int, int, const char*);
|
||||||
};
|
} imgvar_t;
|
||||||
|
|
||||||
extern struct imgvar_t imgvar[];
|
extern imgvar_t imgvar[];
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
static sigset_t nut_upslog_sigmask;
|
static sigset_t nut_upslog_sigmask;
|
||||||
static char logbuffer[LARGEBUF], *logformat;
|
static char logbuffer[LARGEBUF], *logformat;
|
||||||
|
|
||||||
static struct flist_t *fhead = NULL;
|
static flist_t *fhead = NULL;
|
||||||
|
|
||||||
#define DEFAULT_LOGFORMAT "%TIME @Y@m@d @H@M@S% %VAR battery.charge% " \
|
#define DEFAULT_LOGFORMAT "%TIME @Y@m@d @H@M@S% %VAR battery.charge% " \
|
||||||
"%VAR input.voltage% %VAR ups.load% [%VAR ups.status%] " \
|
"%VAR input.voltage% %VAR ups.load% [%VAR ups.status%] " \
|
||||||
|
@ -109,7 +109,7 @@ static void help(const char *prog)
|
||||||
printf(" - Use -f \"<format>\" so your shell doesn't break it up.\n");
|
printf(" - Use -f \"<format>\" so your shell doesn't break it up.\n");
|
||||||
printf(" -i <interval> - Time between updates, in seconds\n");
|
printf(" -i <interval> - Time between updates, in seconds\n");
|
||||||
printf(" -l <logfile> - Log file name, or - for stdout\n");
|
printf(" -l <logfile> - Log file name, or - for stdout\n");
|
||||||
printf(" -p <pidbase> - Base name for PID file (defaults to \"upslog\")\n");
|
printf(" -p <pidbase> - Base name for PID file (defaults to \"%s\")\n", prog);
|
||||||
printf(" -s <ups> - Monitor UPS <ups> - <upsname>@<host>[:<port>]\n");
|
printf(" -s <ups> - Monitor UPS <ups> - <upsname>@<host>[:<port>]\n");
|
||||||
printf(" - Example: -s myups@server\n");
|
printf(" - Example: -s myups@server\n");
|
||||||
printf(" -u <user> - Switch to <user> if started as root\n");
|
printf(" -u <user> - Switch to <user> if started as root\n");
|
||||||
|
@ -238,7 +238,7 @@ static void print_literal(const char *arg)
|
||||||
/* register another parsing function to be called later */
|
/* register another parsing function to be called later */
|
||||||
static void add_call(void (*fptr)(const char *arg), const char *arg)
|
static void add_call(void (*fptr)(const char *arg), const char *arg)
|
||||||
{
|
{
|
||||||
struct flist_t *tmp, *last;
|
flist_t *tmp, *last;
|
||||||
|
|
||||||
tmp = last = fhead;
|
tmp = last = fhead;
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ static void add_call(void (*fptr)(const char *arg), const char *arg)
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = xmalloc(sizeof(struct flist_t));
|
tmp = xmalloc(sizeof(flist_t));
|
||||||
|
|
||||||
tmp->fptr = fptr;
|
tmp->fptr = fptr;
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ static void compile_format(void)
|
||||||
/* go through the list of functions and call them in order */
|
/* go through the list of functions and call them in order */
|
||||||
static void run_flist(void)
|
static void run_flist(void)
|
||||||
{
|
{
|
||||||
struct flist_t *tmp;
|
flist_t *tmp;
|
||||||
|
|
||||||
tmp = fhead;
|
tmp = fhead;
|
||||||
|
|
||||||
|
@ -369,18 +369,16 @@ static void run_flist(void)
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int interval = 30, i;
|
int interval = 30, i;
|
||||||
char *prog = NULL;
|
const char *prog = xbasename(argv[0]);
|
||||||
time_t now, nextpoll = 0;
|
time_t now, nextpoll = 0;
|
||||||
const char *user = NULL;
|
const char *user = NULL;
|
||||||
struct passwd *new_uid = NULL;
|
struct passwd *new_uid = NULL;
|
||||||
const char *pidfilebase = "upslog";
|
const char *pidfilebase = prog;
|
||||||
|
|
||||||
logformat = DEFAULT_LOGFORMAT;
|
logformat = DEFAULT_LOGFORMAT;
|
||||||
user = RUN_AS_USER;
|
user = RUN_AS_USER;
|
||||||
|
|
||||||
printf("Network UPS Tools upslog %s\n", UPS_VERSION);
|
printf("Network UPS Tools %s %s\n", prog, UPS_VERSION);
|
||||||
|
|
||||||
prog = argv[0];
|
|
||||||
|
|
||||||
while ((i = getopt(argc, argv, "+hs:l:i:f:u:Vp:")) != -1) {
|
while ((i = getopt(argc, argv, "+hs:l:i:f:u:Vp:")) != -1) {
|
||||||
switch(i) {
|
switch(i) {
|
||||||
|
@ -476,7 +474,7 @@ int main(int argc, char **argv)
|
||||||
/* now drop root if we have it */
|
/* now drop root if we have it */
|
||||||
new_uid = get_user_pwent(user);
|
new_uid = get_user_pwent(user);
|
||||||
|
|
||||||
openlog("upslog", LOG_PID, LOG_FACILITY);
|
open_syslog(prog);
|
||||||
|
|
||||||
if (logfile != stdout)
|
if (logfile != stdout)
|
||||||
background();
|
background();
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
/* upslog.h - table of functions for handling various logging functions */
|
/* upslog.h - table of functions for handling various logging functions */
|
||||||
|
|
||||||
/* function list */
|
/* function list */
|
||||||
struct flist_t {
|
typedef struct flist_s {
|
||||||
void (*fptr)(const char *arg);
|
void (*fptr)(const char *arg);
|
||||||
const char *arg;
|
const char *arg;
|
||||||
struct flist_t *next;
|
struct flist_s *next;
|
||||||
};
|
} flist_t;
|
||||||
|
|
||||||
static void do_host(const char *arg);
|
static void do_host(const char *arg);
|
||||||
static void do_upshost(const char *arg);
|
static void do_upshost(const char *arg);
|
||||||
|
|
|
@ -73,9 +73,7 @@ static int userfsd = 0, use_pipe = 1, pipefd[2];
|
||||||
|
|
||||||
static utype_t *firstups = NULL;
|
static utype_t *firstups = NULL;
|
||||||
|
|
||||||
#ifdef HAVE_IPV6
|
|
||||||
static int opt_af = AF_UNSPEC;
|
static int opt_af = AF_UNSPEC;
|
||||||
#endif
|
|
||||||
|
|
||||||
/* signal handling things */
|
/* signal handling things */
|
||||||
static struct sigaction sa;
|
static struct sigaction sa;
|
||||||
|
@ -89,12 +87,12 @@ static sigset_t nut_upsmon_sigmask;
|
||||||
|
|
||||||
static void setflag(int *val, int flag)
|
static void setflag(int *val, int flag)
|
||||||
{
|
{
|
||||||
*val = (*val |= flag);
|
*val |= flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clearflag(int *val, int flag)
|
static void clearflag(int *val, int flag)
|
||||||
{
|
{
|
||||||
*val = (*val ^= (*val & flag));
|
*val ^= (*val & flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int flag_isset(int num, int flag)
|
static int flag_isset(int num, int flag)
|
||||||
|
@ -1431,13 +1429,11 @@ static int try_connect(utype_t *ups)
|
||||||
else
|
else
|
||||||
flags |= UPSCLI_CONN_TRYSSL;
|
flags |= UPSCLI_CONN_TRYSSL;
|
||||||
|
|
||||||
#ifdef HAVE_IPV6
|
|
||||||
if (opt_af == AF_INET)
|
if (opt_af == AF_INET)
|
||||||
flags |= UPSCLI_CONN_INET;
|
flags |= UPSCLI_CONN_INET;
|
||||||
|
|
||||||
if (opt_af == AF_INET6)
|
if (opt_af == AF_INET6)
|
||||||
flags |= UPSCLI_CONN_INET6;
|
flags |= UPSCLI_CONN_INET6;
|
||||||
#endif
|
|
||||||
|
|
||||||
ret = upscli_connect(&ups->conn, ups->hostname, ups->port, flags);
|
ret = upscli_connect(&ups->conn, ups->hostname, ups->port, flags);
|
||||||
|
|
||||||
|
@ -1674,10 +1670,8 @@ static void help(const char *progname)
|
||||||
printf(" -K checks POWERDOWNFLAG, sets exit code to 0 if set\n");
|
printf(" -K checks POWERDOWNFLAG, sets exit code to 0 if set\n");
|
||||||
printf(" -p always run privileged (disable privileged parent)\n");
|
printf(" -p always run privileged (disable privileged parent)\n");
|
||||||
printf(" -u <user> run child as user <user> (ignored when using -p)\n");
|
printf(" -u <user> run child as user <user> (ignored when using -p)\n");
|
||||||
#ifdef HAVE_IPV6
|
|
||||||
printf(" -4 IPv4 only\n");
|
printf(" -4 IPv4 only\n");
|
||||||
printf(" -6 IPv6 only\n");
|
printf(" -6 IPv6 only\n");
|
||||||
#endif
|
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
@ -1718,16 +1712,9 @@ static void runparent(int fd)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fire up the split parent/child scheme */
|
/* fire up the split parent/child scheme */
|
||||||
static void start_pipe(const char *user)
|
static void start_pipe(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
struct passwd *new_uid = NULL;
|
|
||||||
|
|
||||||
/* default user = the --with-user value from configure */
|
|
||||||
if (user)
|
|
||||||
new_uid = get_user_pwent(user);
|
|
||||||
else
|
|
||||||
new_uid = get_user_pwent(RUN_AS_USER);
|
|
||||||
|
|
||||||
ret = pipe(pipefd);
|
ret = pipe(pipefd);
|
||||||
|
|
||||||
|
@ -1748,11 +1735,6 @@ static void start_pipe(const char *user)
|
||||||
}
|
}
|
||||||
|
|
||||||
close(pipefd[0]);
|
close(pipefd[0]);
|
||||||
|
|
||||||
/* write the pid file now, as we will soon lose root */
|
|
||||||
writepid("upsmon");
|
|
||||||
|
|
||||||
become_user(new_uid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void delete_ups(utype_t *target)
|
static void delete_ups(utype_t *target)
|
||||||
|
@ -1897,11 +1879,17 @@ static void check_parent(void)
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i, cmd, checking_flag = 0;
|
const char *prog = xbasename(argv[0]);
|
||||||
|
int i, cmd = 0, checking_flag = 0;
|
||||||
|
|
||||||
cmd = 0;
|
printf("Network UPS Tools %s %s\n", prog, UPS_VERSION);
|
||||||
|
|
||||||
printf("Network UPS Tools upsmon %s\n", UPS_VERSION);
|
/* if no configuration file is specified on the command line, use default */
|
||||||
|
configfile = xmalloc(SMALLBUF);
|
||||||
|
snprintf(configfile, SMALLBUF, "%s/upsmon.conf", confpath());
|
||||||
|
configfile = xrealloc(configfile, strlen(configfile) + 1);
|
||||||
|
|
||||||
|
run_as_user = xstrdup(RUN_AS_USER);
|
||||||
|
|
||||||
while ((i = getopt(argc, argv, "+Dhic:f:pu:VK46")) != -1) {
|
while ((i = getopt(argc, argv, "+Dhic:f:pu:VK46")) != -1) {
|
||||||
switch (i) {
|
switch (i) {
|
||||||
|
@ -1921,6 +1909,7 @@ int main(int argc, char *argv[])
|
||||||
nut_debug_level++;
|
nut_debug_level++;
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
|
free(configfile);
|
||||||
configfile = xstrdup(optarg);
|
configfile = xstrdup(optarg);
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
|
@ -1933,19 +1922,18 @@ int main(int argc, char *argv[])
|
||||||
use_pipe = 0;
|
use_pipe = 0;
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
|
free(run_as_user);
|
||||||
run_as_user = xstrdup(optarg);
|
run_as_user = xstrdup(optarg);
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
/* just show the banner */
|
/* just show the banner */
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
#ifdef HAVE_IPV6
|
|
||||||
case '4':
|
case '4':
|
||||||
opt_af = AF_INET;
|
opt_af = AF_INET;
|
||||||
break;
|
break;
|
||||||
case '6':
|
case '6':
|
||||||
opt_af = AF_INET6;
|
opt_af = AF_INET6;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
help(argv[0]);
|
help(argv[0]);
|
||||||
break;
|
break;
|
||||||
|
@ -1953,21 +1941,14 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmd) {
|
if (cmd) {
|
||||||
sendsignal("upsmon", cmd);
|
sendsignal(prog, cmd);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
openlog("upsmon", LOG_PID, LOG_FACILITY);
|
open_syslog(prog);
|
||||||
|
|
||||||
/* if no configuration file was specified on the command line, use default */
|
|
||||||
if (!configfile) {
|
|
||||||
configfile = xmalloc(SMALLBUF);
|
|
||||||
snprintf(configfile, SMALLBUF, "%s/upsmon.conf", confpath());
|
|
||||||
configfile = xrealloc(configfile, strlen(configfile) + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
loadconfig();
|
loadconfig();
|
||||||
|
|
||||||
|
@ -1997,14 +1978,21 @@ int main(int argc, char *argv[])
|
||||||
upsdebugx(1, "debug level is '%d'", nut_debug_level);
|
upsdebugx(1, "debug level is '%d'", nut_debug_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* === root parent and unprivileged child split here === */
|
|
||||||
|
|
||||||
/* only do the pipe stuff if the user hasn't disabled it */
|
/* only do the pipe stuff if the user hasn't disabled it */
|
||||||
if (use_pipe)
|
if (use_pipe) {
|
||||||
start_pipe(run_as_user);
|
struct passwd *new_uid = get_user_pwent(run_as_user);
|
||||||
else {
|
|
||||||
|
/* === root parent and unprivileged child split here === */
|
||||||
|
start_pipe();
|
||||||
|
|
||||||
|
/* write the pid file now, as we will soon lose root */
|
||||||
|
writepid(prog);
|
||||||
|
|
||||||
|
become_user(new_uid);
|
||||||
|
} else {
|
||||||
upslogx(LOG_INFO, "Warning: running as one big root process by request (upsmon -p)");
|
upslogx(LOG_INFO, "Warning: running as one big root process by request (upsmon -p)");
|
||||||
writepid("upsmon");
|
|
||||||
|
writepid(prog);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prep our signal handlers */
|
/* prep our signal handlers */
|
||||||
|
@ -2012,7 +2000,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
/* reopen the log for the child process */
|
/* reopen the log for the child process */
|
||||||
closelog();
|
closelog();
|
||||||
openlog("upsmon", LOG_PID, LOG_FACILITY);
|
open_syslog(prog);
|
||||||
|
|
||||||
while (exit_flag == 0) {
|
while (exit_flag == 0) {
|
||||||
utype_t *ups;
|
utype_t *ups;
|
||||||
|
|
255
clients/upsrw.c
|
@ -26,6 +26,9 @@
|
||||||
|
|
||||||
#include "upsclient.h"
|
#include "upsclient.h"
|
||||||
|
|
||||||
|
static char *upsname = NULL, *hostname = NULL;
|
||||||
|
static UPSCONN_t *ups = NULL;
|
||||||
|
|
||||||
struct list_t {
|
struct list_t {
|
||||||
char *name;
|
char *name;
|
||||||
struct list_t *next;
|
struct list_t *next;
|
||||||
|
@ -33,7 +36,7 @@ struct list_t {
|
||||||
|
|
||||||
static void usage(const char *prog)
|
static void usage(const char *prog)
|
||||||
{
|
{
|
||||||
printf("Network UPS Tools upsrw %s\n\n", UPS_VERSION);
|
printf("Network UPS Tools %s %s\n\n", prog, UPS_VERSION);
|
||||||
printf("usage: %s [-h]\n", prog);
|
printf("usage: %s [-h]\n", prog);
|
||||||
printf(" %s [-s <variable>] [-u <username>] [-p <password>] <ups>\n\n", prog);
|
printf(" %s [-s <variable>] [-u <username>] [-p <password>] <ups>\n\n", prog);
|
||||||
printf("Demo program to set variables within UPS hardware.\n");
|
printf("Demo program to set variables within UPS hardware.\n");
|
||||||
|
@ -47,56 +50,45 @@ static void usage(const char *prog)
|
||||||
printf(" <ups> UPS identifier - <upsname>[@<hostname>[:<port>]]\n");
|
printf(" <ups> UPS identifier - <upsname>[@<hostname>[:<port>]]\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("Call without -s to show all possible read/write variables.\n");
|
printf("Call without -s to show all possible read/write variables.\n");
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clean_exit(UPSCONN_t *ups, char *upsname, char *hostname, int code)
|
static void clean_exit(void)
|
||||||
{
|
{
|
||||||
|
if (ups) {
|
||||||
|
upscli_disconnect(ups);
|
||||||
|
}
|
||||||
|
|
||||||
free(upsname);
|
free(upsname);
|
||||||
free(hostname);
|
free(hostname);
|
||||||
|
free(ups);
|
||||||
upscli_disconnect(ups);
|
|
||||||
|
|
||||||
exit(code);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_set(UPSCONN_t *ups, const char *upsname, const char *varname,
|
static void do_set(const char *varname, const char *newval)
|
||||||
const char *newval)
|
|
||||||
{
|
{
|
||||||
char buf[SMALLBUF], enc[SMALLBUF];
|
char buf[SMALLBUF], enc[SMALLBUF];
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "SET VAR %s %s \"%s\"\n",
|
snprintf(buf, sizeof(buf), "SET VAR %s %s \"%s\"\n", upsname, varname, pconf_encode(newval, enc, sizeof(enc)));
|
||||||
upsname, varname, pconf_encode(newval, enc, sizeof(enc)));
|
|
||||||
|
|
||||||
if (upscli_sendline(ups, buf, strlen(buf)) < 0) {
|
if (upscli_sendline(ups, buf, strlen(buf)) < 0) {
|
||||||
fprintf(stderr, "Can't set variable: %s\n",
|
fatalx(EXIT_FAILURE, "Can't set variable: %s", upscli_strerror(ups));
|
||||||
upscli_strerror(ups));
|
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (upscli_readline(ups, buf, sizeof(buf)) < 0) {
|
if (upscli_readline(ups, buf, sizeof(buf)) < 0) {
|
||||||
fprintf(stderr, "Set variable failed: %s\n",
|
fatalx(EXIT_FAILURE, "Set variable failed: %s", upscli_strerror(ups));
|
||||||
upscli_strerror(ups));
|
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FUTURE: status cookies will tie in here */
|
/* FUTURE: status cookies will tie in here */
|
||||||
if (strncmp(buf, "OK", 2) != 0) {
|
if (strncmp(buf, "OK", 2) != 0) {
|
||||||
printf("Unexpected response from upsd: %s\n", buf);
|
fatalx(EXIT_FAILURE, "Unexpected response from upsd: %s", buf);
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
fprintf(stderr, "%s\n", buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_setvar(UPSCONN_t *ups, const char *varname, char *uin,
|
static void do_setvar(const char *varname, char *uin, const char *pass)
|
||||||
const char *pass, char *upsname, char *hostname)
|
|
||||||
{
|
{
|
||||||
char newval[SMALLBUF], temp[SMALLBUF], user[SMALLBUF], *ptr;
|
char newval[SMALLBUF], temp[SMALLBUF], user[SMALLBUF], *ptr;
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
|
|
||||||
if (uin) {
|
if (uin) {
|
||||||
snprintf(user, sizeof(user), "%s", uin);
|
snprintf(user, sizeof(user), "%s", uin);
|
||||||
|
@ -105,22 +97,24 @@ static int do_setvar(UPSCONN_t *ups, const char *varname, char *uin,
|
||||||
|
|
||||||
pw = getpwuid(getuid());
|
pw = getpwuid(getuid());
|
||||||
|
|
||||||
if (pw)
|
if (pw) {
|
||||||
printf("Username (%s): ", pw->pw_name);
|
printf("Username (%s): ", pw->pw_name);
|
||||||
else
|
} else {
|
||||||
printf("Username: ");
|
printf("Username: ");
|
||||||
|
}
|
||||||
|
|
||||||
if (fgets(user, sizeof(user), stdin) == NULL) {
|
if (fgets(user, sizeof(user), stdin) == NULL) {
|
||||||
upsdebug_with_errno(LOG_INFO, "%s", __func__);
|
upsdebug_with_errno(LOG_INFO, "%s", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* deal with that pesky newline */
|
/* deal with that pesky newline */
|
||||||
if (strlen(user) > 1)
|
if (strlen(user) > 1) {
|
||||||
user[strlen(user) - 1] = '\0';
|
user[strlen(user) - 1] = '\0';
|
||||||
else {
|
} else {
|
||||||
if (!pw)
|
if (!pw) {
|
||||||
fatalx(EXIT_FAILURE, "No username available - even tried getpwuid");
|
fatalx(EXIT_FAILURE, "No username available - even tried getpwuid");
|
||||||
|
}
|
||||||
|
|
||||||
snprintf(user, sizeof(user), "%s", pw->pw_name);
|
snprintf(user, sizeof(user), "%s", pw->pw_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -130,10 +124,7 @@ static int do_setvar(UPSCONN_t *ups, const char *varname, char *uin,
|
||||||
pass = GETPASS("Password: " );
|
pass = GETPASS("Password: " );
|
||||||
|
|
||||||
if (!pass) {
|
if (!pass) {
|
||||||
fprintf(stderr, "getpass failed: %s\n",
|
fatal_with_errno(EXIT_FAILURE, "getpass failed");
|
||||||
strerror(errno));
|
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,116 +144,93 @@ static int do_setvar(UPSCONN_t *ups, const char *varname, char *uin,
|
||||||
snprintf(temp, sizeof(temp), "USERNAME %s\n", user);
|
snprintf(temp, sizeof(temp), "USERNAME %s\n", user);
|
||||||
|
|
||||||
if (upscli_sendline(ups, temp, strlen(temp)) < 0) {
|
if (upscli_sendline(ups, temp, strlen(temp)) < 0) {
|
||||||
fprintf(stderr, "Can't set username: %s\n",
|
fatalx(EXIT_FAILURE, "Can't set username: %s", upscli_strerror(ups));
|
||||||
upscli_strerror(ups));
|
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (upscli_readline(ups, temp, sizeof(temp)) < 0) {
|
if (upscli_readline(ups, temp, sizeof(temp)) < 0) {
|
||||||
|
|
||||||
if (upscli_upserror(ups) == UPSCLI_ERR_UNKCOMMAND) {
|
if (upscli_upserror(ups) == UPSCLI_ERR_UNKCOMMAND) {
|
||||||
fprintf(stderr, "Set username failed due to an "
|
fatalx(EXIT_FAILURE, "Set username failed due to an unknown command. You probably need to upgrade upsd.");
|
||||||
"unknown command.\n");
|
|
||||||
|
|
||||||
fprintf(stderr, "You probably need to upgrade upsd.\n");
|
|
||||||
|
|
||||||
clean_exit(ups, upsname, hostname, EXIT_FAILURE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "Set username failed: %s\n",
|
fatalx(EXIT_FAILURE, "Set username failed: %s", upscli_strerror(ups));
|
||||||
upscli_strerror(ups));
|
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(temp, sizeof(temp), "PASSWORD %s\n", pass);
|
snprintf(temp, sizeof(temp), "PASSWORD %s\n", pass);
|
||||||
|
|
||||||
if (upscli_sendline(ups, temp, strlen(temp)) < 0) {
|
if (upscli_sendline(ups, temp, strlen(temp)) < 0) {
|
||||||
fprintf(stderr, "Can't set password: %s\n",
|
fatalx(EXIT_FAILURE, "Can't set password: %s", upscli_strerror(ups));
|
||||||
upscli_strerror(ups));
|
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (upscli_readline(ups, temp, sizeof(temp)) < 0) {
|
if (upscli_readline(ups, temp, sizeof(temp)) < 0) {
|
||||||
fprintf(stderr, "Set password failed: %s\n",
|
fatalx(EXIT_FAILURE, "Set password failed: %s", upscli_strerror(ups));
|
||||||
upscli_strerror(ups));
|
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* no upsname means die */
|
/* no upsname means die */
|
||||||
if (!upsname) {
|
if (!upsname) {
|
||||||
fprintf(stderr, "Error: a UPS name must be specified (upsname[@hostname[:port]])\n");
|
fatalx(EXIT_FAILURE, "Error: a UPS name must be specified (upsname[@hostname[:port]])");
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* old variable names are no longer supported */
|
/* old variable names are no longer supported */
|
||||||
if (!strchr(varname, '.')) {
|
if (!strchr(varname, '.')) {
|
||||||
fprintf(stderr, "Error: old variable names are not supported\n");
|
fatalx(EXIT_FAILURE, "Error: old variable names are not supported");
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return do_set(ups, upsname, varname, newval);
|
do_set(varname, newval);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *get_data(const char *type, UPSCONN_t *ups,
|
static const char *get_data(const char *type, const char *varname)
|
||||||
const char *upsname, const char *varname)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
unsigned int numq, numa;
|
unsigned int numq, numa;
|
||||||
char **answer;
|
char **answer;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
|
|
||||||
query[0] = type;
|
query[0] = type;
|
||||||
query[1] = upsname;
|
query[1] = upsname;
|
||||||
query[2] = varname;
|
query[2] = varname;
|
||||||
|
|
||||||
numq = 3;
|
numq = 3;
|
||||||
|
|
||||||
ret = upscli_get(ups, numq, query, &numa, &answer);
|
ret = upscli_get(ups, numq, query, &numa, &answer);
|
||||||
|
|
||||||
if ((ret < 0) || (numa < numq))
|
if ((ret < 0) || (numa < numq)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* <type> <upsname> <varname> <desc> */
|
/* <type> <upsname> <varname> <desc> */
|
||||||
return answer[3];
|
return answer[3];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_string(UPSCONN_t *ups, const char *upsname, const char *varname)
|
static void do_string(const char *varname)
|
||||||
{
|
{
|
||||||
const char *val;
|
const char *val;
|
||||||
|
|
||||||
val = get_data("VAR", ups, upsname, varname);
|
val = get_data("VAR", varname);
|
||||||
|
|
||||||
if (!val) {
|
if (!val) {
|
||||||
fprintf(stderr, "do_string: can't get current value of %s\n",
|
fatalx(EXIT_FAILURE, "do_string: can't get current value of %s", varname);
|
||||||
varname);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Type: STRING\n");
|
printf("Type: STRING\n");
|
||||||
printf("Value: %s\n", val);
|
printf("Value: %s\n", val);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_enum(UPSCONN_t *ups, const char *upsname, const char *varname)
|
static void do_enum(const char *varname)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
unsigned int numq, numa;
|
unsigned int numq, numa;
|
||||||
char **answer, *val;
|
char **answer, buf[SMALLBUF];
|
||||||
const char *query[4], *tmp;
|
const char *query[4], *val;
|
||||||
|
|
||||||
/* get current value */
|
/* get current value */
|
||||||
tmp = get_data("VAR", ups, upsname, varname);
|
val = get_data("VAR", varname);
|
||||||
|
|
||||||
if (!tmp) {
|
if (!val) {
|
||||||
fprintf(stderr, "do_enum: can't get current value of %s\n",
|
fatalx(EXIT_FAILURE, "do_enum: can't get current value of %s", varname);
|
||||||
varname);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tmp is a pointer into answer - have to save it somewhere else */
|
snprintf(buf, sizeof(buf), "%s", val);
|
||||||
val = xstrdup(tmp);
|
|
||||||
|
|
||||||
query[0] = "ENUM";
|
query[0] = "ENUM";
|
||||||
query[1] = upsname;
|
query[1] = upsname;
|
||||||
|
@ -272,8 +240,7 @@ static void do_enum(UPSCONN_t *ups, const char *upsname, const char *varname)
|
||||||
ret = upscli_list_start(ups, numq, query);
|
ret = upscli_list_start(ups, numq, query);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
fprintf(stderr, "Error: %s\n", upscli_strerror(ups));
|
fatalx(EXIT_FAILURE, "Error: %s", upscli_strerror(ups));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = upscli_list_next(ups, numq, query, &numa, &answer);
|
ret = upscli_list_next(ups, numq, query, &numa, &answer);
|
||||||
|
@ -285,32 +252,27 @@ static void do_enum(UPSCONN_t *ups, const char *upsname, const char *varname)
|
||||||
/* ENUM <upsname> <varname> <value> */
|
/* ENUM <upsname> <varname> <value> */
|
||||||
|
|
||||||
if (numa < 4) {
|
if (numa < 4) {
|
||||||
fprintf(stderr, "Error: insufficient data "
|
fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa);
|
||||||
"(got %d args, need at least 4)\n", numa);
|
|
||||||
|
|
||||||
free(val);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Option: \"%s\"", answer[3]);
|
printf("Option: \"%s\"", answer[3]);
|
||||||
|
|
||||||
if (!strcmp(answer[3], val))
|
if (!strcmp(answer[3], buf)) {
|
||||||
printf(" SELECTED");
|
printf(" SELECTED");
|
||||||
|
}
|
||||||
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
ret = upscli_list_next(ups, numq, query, &numa, &answer);
|
ret = upscli_list_next(ups, numq, query, &numa, &answer);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(val);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_type(UPSCONN_t *ups, const char *upsname, const char *varname)
|
static void do_type(const char *varname)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
unsigned int i, numq, numa;
|
unsigned int i, numq, numa;
|
||||||
char **answer;
|
char **answer;
|
||||||
const char *query[4];
|
const char *query[4];
|
||||||
|
|
||||||
query[0] = "TYPE";
|
query[0] = "TYPE";
|
||||||
query[1] = upsname;
|
query[1] = upsname;
|
||||||
|
@ -328,54 +290,54 @@ static void do_type(UPSCONN_t *ups, const char *upsname, const char *varname)
|
||||||
for (i = 3; i < numa; i++) {
|
for (i = 3; i < numa; i++) {
|
||||||
|
|
||||||
if (!strcasecmp(answer[i], "ENUM")) {
|
if (!strcasecmp(answer[i], "ENUM")) {
|
||||||
do_enum(ups, upsname, varname);
|
do_enum(varname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strncasecmp(answer[i], "STRING:", 7)) {
|
if (!strncasecmp(answer[i], "STRING:", 7)) {
|
||||||
do_string(ups, upsname, varname);
|
do_string(varname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ignore this one */
|
/* ignore this one */
|
||||||
if (!strcasecmp(answer[i], "RW"))
|
if (!strcasecmp(answer[i], "RW")) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
printf("Type: %s (unrecognized)\n", answer[i]);
|
printf("Type: %s (unrecognized)\n", answer[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_rw(UPSCONN_t *ups, const char *upsname, const char *varname)
|
static void print_rw(const char *varname)
|
||||||
{
|
{
|
||||||
const char *tmp;
|
const char *tmp;
|
||||||
|
|
||||||
printf("[%s]\n", varname);
|
printf("[%s]\n", varname);
|
||||||
|
|
||||||
tmp = get_data("DESC", ups, upsname, varname);
|
tmp = get_data("DESC", varname);
|
||||||
|
|
||||||
if (tmp)
|
if (tmp) {
|
||||||
printf("%s\n", tmp);
|
printf("%s\n", tmp);
|
||||||
else
|
} else {
|
||||||
printf("Description unavailable\n");
|
printf("Description unavailable\n");
|
||||||
|
}
|
||||||
|
|
||||||
do_type(ups, upsname, varname);
|
do_type(varname);
|
||||||
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int print_rwlist(UPSCONN_t *ups, const char *upsname)
|
static void print_rwlist(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
unsigned int numq, numa;
|
unsigned int numq, numa;
|
||||||
const char *query[2];
|
const char *query[2];
|
||||||
char **answer;
|
char **answer;
|
||||||
struct list_t *lhead, *llast, *ltmp, *lnext;
|
struct list_t *lhead, *llast, *ltmp, *lnext;
|
||||||
|
|
||||||
/* the upsname is now required */
|
/* the upsname is now required */
|
||||||
if (!upsname) {
|
if (!upsname) {
|
||||||
fprintf(stderr, "Error: a UPS name must be specified (upsname[@hostname[:port]])\n");
|
fatalx(EXIT_FAILURE, "Error: a UPS name must be specified (upsname[@hostname[:port]])");
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
llast = lhead = NULL;
|
llast = lhead = NULL;
|
||||||
|
@ -390,12 +352,10 @@ static int print_rwlist(UPSCONN_t *ups, const char *upsname)
|
||||||
|
|
||||||
/* old upsd --> fall back on old LISTRW technique */
|
/* old upsd --> fall back on old LISTRW technique */
|
||||||
if (upscli_upserror(ups) == UPSCLI_ERR_UNKCOMMAND) {
|
if (upscli_upserror(ups) == UPSCLI_ERR_UNKCOMMAND) {
|
||||||
fprintf(stderr, "Error: upsd is too old to support this query\n");
|
fatalx(EXIT_FAILURE, "Error: upsd is too old to support this query");
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr, "Error: %s\n", upscli_strerror(ups));
|
fatalx(EXIT_FAILURE, "Error: %s", upscli_strerror(ups));
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = upscli_list_next(ups, numq, query, &numa, &answer);
|
ret = upscli_list_next(ups, numq, query, &numa, &answer);
|
||||||
|
@ -404,9 +364,7 @@ static int print_rwlist(UPSCONN_t *ups, const char *upsname)
|
||||||
|
|
||||||
/* RW <upsname> <varname> <value> */
|
/* RW <upsname> <varname> <value> */
|
||||||
if (numa < 4) {
|
if (numa < 4) {
|
||||||
fprintf(stderr, "Error: insufficient data "
|
fatalx(EXIT_FAILURE, "Error: insufficient data (got %d args, need at least 4)", numa);
|
||||||
"(got %d args, need at least 4)\n", numa);
|
|
||||||
return EXIT_FAILURE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sock this entry away for later */
|
/* sock this entry away for later */
|
||||||
|
@ -415,10 +373,11 @@ static int print_rwlist(UPSCONN_t *ups, const char *upsname)
|
||||||
ltmp->name = xstrdup(answer[2]);
|
ltmp->name = xstrdup(answer[2]);
|
||||||
ltmp->next = NULL;
|
ltmp->next = NULL;
|
||||||
|
|
||||||
if (llast)
|
if (llast) {
|
||||||
llast->next = ltmp;
|
llast->next = ltmp;
|
||||||
else
|
} else {
|
||||||
lhead = ltmp;
|
lhead = ltmp;
|
||||||
|
}
|
||||||
|
|
||||||
llast = ltmp;
|
llast = ltmp;
|
||||||
|
|
||||||
|
@ -432,28 +391,23 @@ static int print_rwlist(UPSCONN_t *ups, const char *upsname)
|
||||||
while (ltmp) {
|
while (ltmp) {
|
||||||
lnext = ltmp->next;
|
lnext = ltmp->next;
|
||||||
|
|
||||||
print_rw(ups, upsname, ltmp->name);
|
print_rw(ltmp->name);
|
||||||
|
|
||||||
free(ltmp->name);
|
free(ltmp->name);
|
||||||
free(ltmp);
|
free(ltmp);
|
||||||
ltmp = lnext;
|
ltmp = lnext;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i, port, ret;
|
int i, port;
|
||||||
char *upsname, *hostname, *setvar, *prog;
|
const char *prog = xbasename(argv[0]);
|
||||||
char *password = NULL, *username = NULL;
|
char *password = NULL, *username = NULL, *setvar = NULL;
|
||||||
UPSCONN_t ups;
|
|
||||||
|
|
||||||
setvar = username = NULL;
|
|
||||||
prog = argv[0];
|
|
||||||
|
|
||||||
while ((i = getopt(argc, argv, "+s:p:u:V")) != -1) {
|
while ((i = getopt(argc, argv, "+s:p:u:V")) != -1) {
|
||||||
switch (i) {
|
switch (i)
|
||||||
|
{
|
||||||
case 's':
|
case 's':
|
||||||
setvar = optarg;
|
setvar = optarg;
|
||||||
break;
|
break;
|
||||||
|
@ -464,45 +418,42 @@ int main(int argc, char **argv)
|
||||||
username = optarg;
|
username = optarg;
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
printf("Network UPS Tools upsrw %s\n", UPS_VERSION);
|
printf("Network UPS Tools %s %s\n", prog, UPS_VERSION);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
default:
|
default:
|
||||||
usage(prog);
|
usage(prog);
|
||||||
break;
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
if (argc < 1)
|
if (argc < 1) {
|
||||||
usage(prog);
|
usage(prog);
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
upsname = hostname = NULL;
|
/* be a good little client that cleans up after itself */
|
||||||
|
atexit(clean_exit);
|
||||||
|
|
||||||
if (upscli_splitname(argv[0], &upsname, &hostname, &port) != 0) {
|
if (upscli_splitname(argv[0], &upsname, &hostname, &port) != 0) {
|
||||||
fprintf(stderr, "Error: invalid UPS definition. Required format: upsname[@hostname[:port]]\n");
|
fatalx(EXIT_FAILURE, "Error: invalid UPS definition. Required format: upsname[@hostname[:port]]");
|
||||||
clean_exit(&ups, upsname, hostname, EXIT_FAILURE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (upscli_connect(&ups, hostname, port, 0) < 0) {
|
ups = xcalloc(1, sizeof(*ups));
|
||||||
fprintf(stderr, "Can't connect: %s\n", upscli_strerror(&ups));
|
|
||||||
clean_exit(&ups, upsname, hostname, EXIT_FAILURE);
|
if (upscli_connect(ups, hostname, port, 0) < 0) {
|
||||||
|
fatalx(EXIT_FAILURE, "Error: %s", upscli_strerror(ups));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* setting a variable? */
|
|
||||||
if (setvar) {
|
if (setvar) {
|
||||||
ret = do_setvar(&ups, setvar, username, password, upsname,
|
/* setting a variable */
|
||||||
hostname);
|
do_setvar(setvar, username, password);
|
||||||
|
} else {
|
||||||
clean_exit(&ups, upsname, hostname, ret);
|
/* if not, get the list of supported read/write variables */
|
||||||
|
print_rwlist();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if not, get the list of supported read/write variables */
|
exit(EXIT_SUCCESS);
|
||||||
ret = print_rwlist(&ups, upsname);
|
|
||||||
|
|
||||||
clean_exit(&ups, upsname, hostname, ret);
|
|
||||||
|
|
||||||
/* NOTREACHED */
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,14 +50,14 @@
|
||||||
#include "upssched.h"
|
#include "upssched.h"
|
||||||
#include "timehead.h"
|
#include "timehead.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct ttype_s {
|
||||||
char *name;
|
char *name;
|
||||||
time_t etime;
|
time_t etime;
|
||||||
void *next;
|
struct ttype_s *next;
|
||||||
} ttype_t;
|
} ttype_t;
|
||||||
|
|
||||||
ttype_t *thead = NULL;
|
ttype_t *thead = NULL;
|
||||||
static struct conn_t *connhead = NULL;
|
static conn_t *connhead = NULL;
|
||||||
char *cmdscript = NULL, *pipefn = NULL, *lockfn = NULL;
|
char *cmdscript = NULL, *pipefn = NULL, *lockfn = NULL;
|
||||||
int verbose = 0; /* use for debugging */
|
int verbose = 0; /* use for debugging */
|
||||||
|
|
||||||
|
@ -300,9 +300,9 @@ static int open_sock(void)
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void conn_del(struct conn_t *target)
|
static void conn_del(conn_t *target)
|
||||||
{
|
{
|
||||||
struct conn_t *tmp, *last = NULL;
|
conn_t *tmp, *last = NULL;
|
||||||
|
|
||||||
tmp = connhead;
|
tmp = connhead;
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ static void conn_del(struct conn_t *target)
|
||||||
upslogx(LOG_ERR, "Tried to delete a bogus state connection");
|
upslogx(LOG_ERR, "Tried to delete a bogus state connection");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int send_to_one(struct conn_t *conn, const char *fmt, ...)
|
static int send_to_one(conn_t *conn, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
@ -354,7 +354,7 @@ static int send_to_one(struct conn_t *conn, const char *fmt, ...)
|
||||||
static void conn_add(int sockfd)
|
static void conn_add(int sockfd)
|
||||||
{
|
{
|
||||||
int acc, ret;
|
int acc, ret;
|
||||||
struct conn_t *tmp, *last;
|
conn_t *tmp, *last;
|
||||||
struct sockaddr_un saddr;
|
struct sockaddr_un saddr;
|
||||||
socklen_t salen;
|
socklen_t salen;
|
||||||
|
|
||||||
|
@ -391,7 +391,7 @@ static void conn_add(int sockfd)
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = xmalloc(sizeof(struct conn_t));
|
tmp = xmalloc(sizeof(conn_t));
|
||||||
tmp->fd = acc;
|
tmp->fd = acc;
|
||||||
tmp->next = NULL;
|
tmp->next = NULL;
|
||||||
|
|
||||||
|
@ -405,7 +405,7 @@ static void conn_add(int sockfd)
|
||||||
pconf_init(&tmp->ctx, NULL);
|
pconf_init(&tmp->ctx, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sock_arg(struct conn_t *conn)
|
static int sock_arg(conn_t *conn)
|
||||||
{
|
{
|
||||||
if (conn->ctx.numargs < 1)
|
if (conn->ctx.numargs < 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -446,7 +446,7 @@ static void log_unknown(int numarg, char **arg)
|
||||||
upslogx(LOG_INFO, "arg %d: %s", i, arg[i]);
|
upslogx(LOG_INFO, "arg %d: %s", i, arg[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sock_read(struct conn_t *conn)
|
static int sock_read(conn_t *conn)
|
||||||
{
|
{
|
||||||
int i, ret;
|
int i, ret;
|
||||||
char ch;
|
char ch;
|
||||||
|
@ -494,7 +494,7 @@ static void start_daemon(int lockfd)
|
||||||
int maxfd, pid, pipefd, ret;
|
int maxfd, pid, pipefd, ret;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
fd_set rfds;
|
fd_set rfds;
|
||||||
struct conn_t *tmp, *tmpnext;
|
conn_t *tmp, *tmpnext;
|
||||||
socklen_t fromlen;
|
socklen_t fromlen;
|
||||||
|
|
||||||
fromlen = sizeof(struct sockaddr);
|
fromlen = sizeof(struct sockaddr);
|
||||||
|
@ -899,10 +899,12 @@ static void checkconf(void)
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
const char *prog = xbasename(argv[0]);
|
||||||
|
|
||||||
verbose = 1; /* TODO: remove when done testing */
|
verbose = 1; /* TODO: remove when done testing */
|
||||||
|
|
||||||
/* normally we don't have stderr, so get this going to syslog early */
|
/* normally we don't have stderr, so get this going to syslog early */
|
||||||
openlog("upssched", LOG_PID, LOG_DAEMON);
|
open_syslog(prog);
|
||||||
syslogbit_set();
|
syslogbit_set();
|
||||||
|
|
||||||
upsname = getenv("UPSNAME");
|
upsname = getenv("UPSNAME");
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
#define SERIALIZE_WAIT 3
|
#define SERIALIZE_WAIT 3
|
||||||
|
|
||||||
/* track client connections */
|
/* track client connections */
|
||||||
struct conn_t {
|
typedef struct conn_s {
|
||||||
int fd;
|
int fd;
|
||||||
PCONF_CTX_t ctx;
|
PCONF_CTX_t ctx;
|
||||||
void *next;
|
struct conn_s *next;
|
||||||
};
|
} conn_t;
|
||||||
|
|
|
@ -2,14 +2,15 @@
|
||||||
|
|
||||||
AM_CFLAGS = -I$(top_srcdir)/include
|
AM_CFLAGS = -I$(top_srcdir)/include
|
||||||
|
|
||||||
noinst_LIBRARIES = libcommon.a
|
|
||||||
libcommon_a_SOURCES = common.c state.c upsconf.c ../include/nut_version.h
|
|
||||||
libcommon_a_LIBADD = libparseconf.la
|
|
||||||
|
|
||||||
../include/nut_version.h: FORCE
|
../include/nut_version.h: FORCE
|
||||||
(cd ../include/ && $(MAKE) $(AM_MAKEFLAGS) nut_version.h)
|
(cd ../include/ && $(MAKE) $(AM_MAKEFLAGS) nut_version.h)
|
||||||
|
|
||||||
FORCE:
|
FORCE:
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libparseconf.la
|
noinst_LTLIBRARIES = libparseconf.la libcommon.la
|
||||||
libparseconf_la_SOURCES = parseconf.c
|
libparseconf_la_SOURCES = parseconf.c
|
||||||
|
|
||||||
|
libcommon_la_SOURCES = common.c state.c upsconf.c ../include/nut_version.h
|
||||||
|
# ensure inclusion of local implementation of missing systems functions
|
||||||
|
# using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS
|
||||||
|
libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
# Network UPS Tools: common
|
# Network UPS Tools: common
|
||||||
|
|
||||||
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
@ -39,14 +38,16 @@ build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
target_triplet = @target@
|
target_triplet = @target@
|
||||||
subdir = common
|
subdir = common
|
||||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in atexit.c \
|
||||||
|
setenv.c snprintf.c strerror.c
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_ipv6.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
|
@ -56,6 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
|
$(top_srcdir)/m4/nut_config_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.in
|
$(top_srcdir)/configure.in
|
||||||
|
@ -65,14 +67,10 @@ mkinstalldirs = $(install_sh) -d
|
||||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
LIBRARIES = $(noinst_LIBRARIES)
|
|
||||||
ARFLAGS = cru
|
|
||||||
libcommon_a_AR = $(AR) $(ARFLAGS)
|
|
||||||
libcommon_a_DEPENDENCIES = libparseconf.la
|
|
||||||
am_libcommon_a_OBJECTS = common.$(OBJEXT) state.$(OBJEXT) \
|
|
||||||
upsconf.$(OBJEXT)
|
|
||||||
libcommon_a_OBJECTS = $(am_libcommon_a_OBJECTS)
|
|
||||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||||
|
libcommon_la_DEPENDENCIES = libparseconf.la @LTLIBOBJS@
|
||||||
|
am_libcommon_la_OBJECTS = common.lo state.lo upsconf.lo
|
||||||
|
libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS)
|
||||||
libparseconf_la_LIBADD =
|
libparseconf_la_LIBADD =
|
||||||
am_libparseconf_la_OBJECTS = parseconf.lo
|
am_libparseconf_la_OBJECTS = parseconf.lo
|
||||||
libparseconf_la_OBJECTS = $(am_libparseconf_la_OBJECTS)
|
libparseconf_la_OBJECTS = $(am_libparseconf_la_OBJECTS)
|
||||||
|
@ -89,14 +87,16 @@ CCLD = $(CC)
|
||||||
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||||
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
|
||||||
$(LDFLAGS) -o $@
|
$(LDFLAGS) -o $@
|
||||||
SOURCES = $(libcommon_a_SOURCES) $(libparseconf_la_SOURCES)
|
SOURCES = $(libcommon_la_SOURCES) $(libparseconf_la_SOURCES)
|
||||||
DIST_SOURCES = $(libcommon_a_SOURCES) $(libparseconf_la_SOURCES)
|
DIST_SOURCES = $(libcommon_la_SOURCES) $(libparseconf_la_SOURCES)
|
||||||
ETAGS = etags
|
ETAGS = etags
|
||||||
CTAGS = ctags
|
CTAGS = ctags
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
A2X = @A2X@
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
|
ASCIIDOC = @ASCIIDOC@
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -109,8 +109,10 @@ CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DBLATEX = @DBLATEX@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -127,7 +129,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@
|
||||||
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
||||||
HAL_FDI_PATH = @HAL_FDI_PATH@
|
HAL_FDI_PATH = @HAL_FDI_PATH@
|
||||||
HAL_USER = @HAL_USER@
|
HAL_USER = @HAL_USER@
|
||||||
HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
@ -138,22 +139,22 @@ LDFLAGS = @LDFLAGS@
|
||||||
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
||||||
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
||||||
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
||||||
LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@
|
LIBHAL_LIBS = @LIBHAL_LIBS@
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@
|
LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
||||||
LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@
|
LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
@ -250,11 +251,12 @@ top_builddir = @top_builddir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
udevdir = @udevdir@
|
udevdir = @udevdir@
|
||||||
AM_CFLAGS = -I$(top_srcdir)/include
|
AM_CFLAGS = -I$(top_srcdir)/include
|
||||||
noinst_LIBRARIES = libcommon.a
|
noinst_LTLIBRARIES = libparseconf.la libcommon.la
|
||||||
libcommon_a_SOURCES = common.c state.c upsconf.c ../include/nut_version.h
|
|
||||||
libcommon_a_LIBADD = libparseconf.la
|
|
||||||
noinst_LTLIBRARIES = libparseconf.la
|
|
||||||
libparseconf_la_SOURCES = parseconf.c
|
libparseconf_la_SOURCES = parseconf.c
|
||||||
|
libcommon_la_SOURCES = common.c state.c upsconf.c ../include/nut_version.h
|
||||||
|
# ensure inclusion of local implementation of missing systems functions
|
||||||
|
# using LTLIBOBJS. Refer to configure.in -> AC_REPLACE_FUNCS
|
||||||
|
libcommon_la_LIBADD = libparseconf.la @LTLIBOBJS@
|
||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
@ -290,13 +292,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
clean-noinstLIBRARIES:
|
|
||||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
|
||||||
libcommon.a: $(libcommon_a_OBJECTS) $(libcommon_a_DEPENDENCIES)
|
|
||||||
-rm -f libcommon.a
|
|
||||||
$(libcommon_a_AR) libcommon.a $(libcommon_a_OBJECTS) $(libcommon_a_LIBADD)
|
|
||||||
$(RANLIB) libcommon.a
|
|
||||||
|
|
||||||
clean-noinstLTLIBRARIES:
|
clean-noinstLTLIBRARIES:
|
||||||
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
|
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
|
||||||
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
|
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
|
||||||
|
@ -305,6 +300,8 @@ clean-noinstLTLIBRARIES:
|
||||||
echo "rm -f \"$${dir}/so_locations\""; \
|
echo "rm -f \"$${dir}/so_locations\""; \
|
||||||
rm -f "$${dir}/so_locations"; \
|
rm -f "$${dir}/so_locations"; \
|
||||||
done
|
done
|
||||||
|
libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES)
|
||||||
|
$(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS)
|
||||||
libparseconf.la: $(libparseconf_la_OBJECTS) $(libparseconf_la_DEPENDENCIES)
|
libparseconf.la: $(libparseconf_la_OBJECTS) $(libparseconf_la_DEPENDENCIES)
|
||||||
$(LINK) $(libparseconf_la_OBJECTS) $(libparseconf_la_LIBADD) $(LIBS)
|
$(LINK) $(libparseconf_la_OBJECTS) $(libparseconf_la_LIBADD) $(LIBS)
|
||||||
|
|
||||||
|
@ -314,10 +311,14 @@ mostlyclean-compile:
|
||||||
distclean-compile:
|
distclean-compile:
|
||||||
-rm -f *.tab.c
|
-rm -f *.tab.c
|
||||||
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/atexit.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/setenv.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strerror.Plo@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseconf.Plo@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseconf.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/state.Plo@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsconf.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsconf.Plo@am__quote@
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
|
@ -430,7 +431,7 @@ distdir: $(DISTFILES)
|
||||||
done
|
done
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-am
|
check: check-am
|
||||||
all-am: Makefile $(LIBRARIES) $(LTLIBRARIES)
|
all-am: Makefile $(LTLIBRARIES)
|
||||||
installdirs:
|
installdirs:
|
||||||
install: install-am
|
install: install-am
|
||||||
install-exec: install-exec-am
|
install-exec: install-exec-am
|
||||||
|
@ -459,11 +460,11 @@ maintainer-clean-generic:
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
clean: clean-am
|
clean: clean-am
|
||||||
|
|
||||||
clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
|
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
|
||||||
clean-noinstLTLIBRARIES mostlyclean-am
|
mostlyclean-am
|
||||||
|
|
||||||
distclean: distclean-am
|
distclean: distclean-am
|
||||||
-rm -rf ./$(DEPDIR)
|
-rm -rf $(DEPDIR) ./$(DEPDIR)
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
distclean-am: clean-am distclean-compile distclean-generic \
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
distclean-tags
|
distclean-tags
|
||||||
|
@ -509,7 +510,7 @@ install-ps-am:
|
||||||
installcheck-am:
|
installcheck-am:
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-am
|
maintainer-clean: maintainer-clean-am
|
||||||
-rm -rf ./$(DEPDIR)
|
-rm -rf $(DEPDIR) ./$(DEPDIR)
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
@ -531,18 +532,17 @@ uninstall-am:
|
||||||
.MAKE: install-am install-strip
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||||
clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \
|
clean-libtool clean-noinstLTLIBRARIES ctags distclean \
|
||||||
ctags distclean distclean-compile distclean-generic \
|
distclean-compile distclean-generic distclean-libtool \
|
||||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||||
html-am info info-am install install-am install-data \
|
install install-am install-data install-data-am install-dvi \
|
||||||
install-data-am install-dvi install-dvi-am install-exec \
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
install-exec-am install-html install-html-am install-info \
|
install-html-am install-info install-info-am install-man \
|
||||||
install-info-am install-man install-pdf install-pdf-am \
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
install-ps install-ps-am install-strip installcheck \
|
install-strip installcheck installcheck-am installdirs \
|
||||||
installcheck-am installdirs maintainer-clean \
|
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
pdf pdf-am ps ps-am tags uninstall uninstall-am
|
||||||
tags uninstall uninstall-am
|
|
||||||
|
|
||||||
|
|
||||||
../include/nut_version.h: FORCE
|
../include/nut_version.h: FORCE
|
||||||
|
|
22
common/atexit.c
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/* atexit() Mark Powell <medp@primagraphics.co.uk> */
|
||||||
|
/* Implemented in terms of on_exit() for old BSD-style systems, like SunOS4 */
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifndef HAVE_ATEXIT
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
int atexit(fn)
|
||||||
|
void (*fn)();
|
||||||
|
{
|
||||||
|
#ifdef HAVE_ON_EXIT
|
||||||
|
return on_exit(fn, 0);
|
||||||
|
#else
|
||||||
|
/* Choose some errno thats likely to exist on lots of systems */
|
||||||
|
errno = EPERM;
|
||||||
|
return (-1);
|
||||||
|
#endif /* HAVE_ON_EXIT */
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* HAVE_ATEXIT */
|
|
@ -33,16 +33,17 @@
|
||||||
const char *UPS_VERSION = NUT_VERSION_MACRO;
|
const char *UPS_VERSION = NUT_VERSION_MACRO;
|
||||||
|
|
||||||
int nut_debug_level = 0;
|
int nut_debug_level = 0;
|
||||||
|
int nut_log_level = 0;
|
||||||
static int upslog_flags = UPSLOG_STDERR;
|
static int upslog_flags = UPSLOG_STDERR;
|
||||||
|
|
||||||
static void xbit_set(int *val, int flag)
|
static void xbit_set(int *val, int flag)
|
||||||
{
|
{
|
||||||
*val = (*val |= flag);
|
*val |= flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void xbit_clear(int *val, int flag)
|
static void xbit_clear(int *val, int flag)
|
||||||
{
|
{
|
||||||
*val = (*val ^= (*val & flag));
|
*val ^= (*val & flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int xbit_test(int val, int flag)
|
static int xbit_test(int val, int flag)
|
||||||
|
@ -70,6 +71,44 @@ void open_syslog(const char *progname)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
openlog(progname, opt, LOG_FACILITY);
|
openlog(progname, opt, LOG_FACILITY);
|
||||||
|
|
||||||
|
switch (nut_log_level)
|
||||||
|
{
|
||||||
|
#if HAVE_SETLOGMASK && HAVE_DECL_LOG_UPTO
|
||||||
|
case 7:
|
||||||
|
setlogmask(LOG_UPTO(LOG_EMERG)); /* system is unusable */
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
setlogmask(LOG_UPTO(LOG_ALERT)); /* action must be taken immediately */
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
setlogmask(LOG_UPTO(LOG_CRIT)); /* critical conditions */
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
setlogmask(LOG_UPTO(LOG_ERR)); /* error conditions */
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
setlogmask(LOG_UPTO(LOG_WARNING)); /* warning conditions */
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
setlogmask(LOG_UPTO(LOG_NOTICE)); /* normal but significant condition */
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
setlogmask(LOG_UPTO(LOG_INFO)); /* informational */
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
setlogmask(LOG_UPTO(LOG_DEBUG)); /* debug-level messages */
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fatalx(EXIT_FAILURE, "Invalid log level threshold");
|
||||||
|
#else
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
upslogx(LOG_INFO, "Changing log level threshold not possible");
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* close ttys and become a daemon */
|
/* close ttys and become a daemon */
|
||||||
|
|
26
common/setenv.c
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
/* setenv.c Ben Collver <collver@softhome.net> */
|
||||||
|
#ifndef HAVE_SETENV
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
|
int nut_setenv(const char *name, const char *value, int overwrite)
|
||||||
|
{
|
||||||
|
char *val;
|
||||||
|
char *buffer;
|
||||||
|
int rv;
|
||||||
|
|
||||||
|
if (overwrite == 0) {
|
||||||
|
val = getenv(name);
|
||||||
|
if (val != NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
buffer = xmalloc(strlen(value) + strlen(name) + 2);
|
||||||
|
strcpy(buffer, name);
|
||||||
|
strcat(buffer, "=");
|
||||||
|
strcat(buffer, value);
|
||||||
|
rv = putenv(buffer); /* man putenv, do not free(buffer) */
|
||||||
|
return (rv);
|
||||||
|
}
|
||||||
|
#endif
|
914
common/snprintf.c
Normal file
|
@ -0,0 +1,914 @@
|
||||||
|
/*
|
||||||
|
* Copyright Patrick Powell 1995
|
||||||
|
* This code is based on code written by Patrick Powell (papowell@astart.com)
|
||||||
|
* It may be used for any purpose as long as this notice remains intact
|
||||||
|
* on all source code distributions
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**************************************************************
|
||||||
|
* Original:
|
||||||
|
* Patrick Powell Tue Apr 11 09:48:21 PDT 1995
|
||||||
|
* A bombproof version of doprnt (dopr) included.
|
||||||
|
* Sigh. This sort of thing is always nasty do deal with. Note that
|
||||||
|
* the version here does not include floating point...
|
||||||
|
*
|
||||||
|
* snprintf() is used instead of sprintf() as it does limit checks
|
||||||
|
* for string length. This covers a nasty loophole.
|
||||||
|
*
|
||||||
|
* The other functions are there to prevent NULL pointers from
|
||||||
|
* causing nast effects.
|
||||||
|
*
|
||||||
|
* More Recently:
|
||||||
|
* Brandon Long <blong@fiction.net> 9/15/96 for mutt 0.43
|
||||||
|
* This was ugly. It is still ugly. I opted out of floating point
|
||||||
|
* numbers, but the formatter understands just about everything
|
||||||
|
* from the normal C string format, at least as far as I can tell from
|
||||||
|
* the Solaris 2.5 printf(3S) man page.
|
||||||
|
*
|
||||||
|
* Brandon Long <blong@fiction.net> 10/22/97 for mutt 0.87.1
|
||||||
|
* Ok, added some minimal floating point support, which means this
|
||||||
|
* probably requires libm on most operating systems. Don't yet
|
||||||
|
* support the exponent (e,E) and sigfig (g,G). Also, fmtint()
|
||||||
|
* was pretty badly broken, it just wasn't being exercised in ways
|
||||||
|
* which showed it, so that's been fixed. Also, formated the code
|
||||||
|
* to mutt conventions, and removed dead code left over from the
|
||||||
|
* original. Also, there is now a builtin-test, just compile with:
|
||||||
|
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
|
||||||
|
* and run snprintf for results.
|
||||||
|
*
|
||||||
|
* Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
|
||||||
|
* The PGP code was using unsigned hexadecimal formats.
|
||||||
|
* Unfortunately, unsigned formats simply didn't work.
|
||||||
|
*
|
||||||
|
* Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8
|
||||||
|
* The original code assumed that both snprintf() and vsnprintf() were
|
||||||
|
* missing. Some systems only have snprintf() but not vsnprintf(), so
|
||||||
|
* the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF.
|
||||||
|
*
|
||||||
|
* Andrew Tridgell (tridge@samba.org) Oct 1998
|
||||||
|
* fixed handling of %.0f
|
||||||
|
* added test for HAVE_LONG_DOUBLE
|
||||||
|
*
|
||||||
|
**************************************************************/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
# include <ctype.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
|
||||||
|
|
||||||
|
/* Define this as a fall through, HAVE_STDARG_H is probably already set */
|
||||||
|
|
||||||
|
#ifndef HAVE_VARARGS_H
|
||||||
|
#define HAVE_VARARGS_H
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* varargs declarations: */
|
||||||
|
|
||||||
|
#if defined(HAVE_STDARG_H)
|
||||||
|
# include <stdarg.h>
|
||||||
|
# define HAVE_STDARGS /* let's hope that works everywhere (mj) */
|
||||||
|
# define VA_LOCAL_DECL va_list ap
|
||||||
|
# define VA_START(f) va_start(ap, f)
|
||||||
|
# define VA_SHIFT(v,t) ; /* no-op for ANSI */
|
||||||
|
# define VA_END va_end(ap)
|
||||||
|
#else
|
||||||
|
# if defined(HAVE_VARARGS_H)
|
||||||
|
# include <varargs.h>
|
||||||
|
# undef HAVE_STDARGS
|
||||||
|
# define VA_LOCAL_DECL va_list ap
|
||||||
|
# define VA_START(f) va_start(ap) /* f is ignored! */
|
||||||
|
# define VA_SHIFT(v,t) v = va_arg(ap,t)
|
||||||
|
# define VA_END va_end(ap)
|
||||||
|
# else
|
||||||
|
/*XX ** NO VARARGS ** XX*/
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_LONG_DOUBLE
|
||||||
|
#define LDOUBLE long double
|
||||||
|
#else
|
||||||
|
#define LDOUBLE double
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_LONG_LONG_INT
|
||||||
|
#define LLONG long long
|
||||||
|
#else
|
||||||
|
#define LLONG long
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*int snprintf (char *str, size_t count, const char *fmt, ...);*/
|
||||||
|
/*int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);*/
|
||||||
|
|
||||||
|
static void dopr (char *buffer, size_t maxlen, const char *format,
|
||||||
|
va_list args);
|
||||||
|
static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
|
char *value, int flags, int min, int max);
|
||||||
|
static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
|
long value, int base, int min, int max, int flags);
|
||||||
|
static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
|
LDOUBLE fvalue, int min, int max, int flags);
|
||||||
|
static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* dopr(): poor man's version of doprintf
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* format read states */
|
||||||
|
#define DP_S_DEFAULT 0
|
||||||
|
#define DP_S_FLAGS 1
|
||||||
|
#define DP_S_MIN 2
|
||||||
|
#define DP_S_DOT 3
|
||||||
|
#define DP_S_MAX 4
|
||||||
|
#define DP_S_MOD 5
|
||||||
|
#define DP_S_CONV 6
|
||||||
|
#define DP_S_DONE 7
|
||||||
|
|
||||||
|
/* format flags - Bits */
|
||||||
|
#define DP_F_MINUS (1 << 0)
|
||||||
|
#define DP_F_PLUS (1 << 1)
|
||||||
|
#define DP_F_SPACE (1 << 2)
|
||||||
|
#define DP_F_NUM (1 << 3)
|
||||||
|
#define DP_F_ZERO (1 << 4)
|
||||||
|
#define DP_F_UP (1 << 5)
|
||||||
|
#define DP_F_UNSIGNED (1 << 6)
|
||||||
|
|
||||||
|
/* Conversion Flags */
|
||||||
|
#define DP_C_SHORT 1
|
||||||
|
#define DP_C_LONG 2
|
||||||
|
#define DP_C_LDOUBLE 3
|
||||||
|
#define DP_C_LLONG 4
|
||||||
|
|
||||||
|
#define char_to_int(p) ((p)- '0')
|
||||||
|
#define MAX(p,q) (((p) >= (q)) ? (p) : (q))
|
||||||
|
|
||||||
|
static void dopr (char *buffer, size_t maxlen, const char *format, va_list args)
|
||||||
|
{
|
||||||
|
char ch;
|
||||||
|
LLONG value;
|
||||||
|
LDOUBLE fvalue;
|
||||||
|
char *strvalue;
|
||||||
|
int min;
|
||||||
|
int max;
|
||||||
|
int state;
|
||||||
|
int flags;
|
||||||
|
int cflags;
|
||||||
|
size_t currlen;
|
||||||
|
|
||||||
|
state = DP_S_DEFAULT;
|
||||||
|
currlen = flags = cflags = min = 0;
|
||||||
|
max = -1;
|
||||||
|
ch = *format++;
|
||||||
|
|
||||||
|
while (state != DP_S_DONE)
|
||||||
|
{
|
||||||
|
if ((ch == '\0') || (currlen >= maxlen))
|
||||||
|
state = DP_S_DONE;
|
||||||
|
|
||||||
|
switch(state)
|
||||||
|
{
|
||||||
|
case DP_S_DEFAULT:
|
||||||
|
if (ch == '%')
|
||||||
|
state = DP_S_FLAGS;
|
||||||
|
else
|
||||||
|
dopr_outch (buffer, &currlen, maxlen, ch);
|
||||||
|
ch = *format++;
|
||||||
|
break;
|
||||||
|
case DP_S_FLAGS:
|
||||||
|
switch (ch)
|
||||||
|
{
|
||||||
|
case '-':
|
||||||
|
flags |= DP_F_MINUS;
|
||||||
|
ch = *format++;
|
||||||
|
break;
|
||||||
|
case '+':
|
||||||
|
flags |= DP_F_PLUS;
|
||||||
|
ch = *format++;
|
||||||
|
break;
|
||||||
|
case ' ':
|
||||||
|
flags |= DP_F_SPACE;
|
||||||
|
ch = *format++;
|
||||||
|
break;
|
||||||
|
case '#':
|
||||||
|
flags |= DP_F_NUM;
|
||||||
|
ch = *format++;
|
||||||
|
break;
|
||||||
|
case '0':
|
||||||
|
flags |= DP_F_ZERO;
|
||||||
|
ch = *format++;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
state = DP_S_MIN;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case DP_S_MIN:
|
||||||
|
if (isdigit((unsigned char)ch))
|
||||||
|
{
|
||||||
|
min = 10*min + char_to_int (ch);
|
||||||
|
ch = *format++;
|
||||||
|
}
|
||||||
|
else if (ch == '*')
|
||||||
|
{
|
||||||
|
min = va_arg (args, int);
|
||||||
|
ch = *format++;
|
||||||
|
state = DP_S_DOT;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
state = DP_S_DOT;
|
||||||
|
break;
|
||||||
|
case DP_S_DOT:
|
||||||
|
if (ch == '.')
|
||||||
|
{
|
||||||
|
state = DP_S_MAX;
|
||||||
|
ch = *format++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
state = DP_S_MOD;
|
||||||
|
break;
|
||||||
|
case DP_S_MAX:
|
||||||
|
if (isdigit((unsigned char)ch))
|
||||||
|
{
|
||||||
|
if (max < 0)
|
||||||
|
max = 0;
|
||||||
|
max = 10*max + char_to_int (ch);
|
||||||
|
ch = *format++;
|
||||||
|
}
|
||||||
|
else if (ch == '*')
|
||||||
|
{
|
||||||
|
max = va_arg (args, int);
|
||||||
|
ch = *format++;
|
||||||
|
state = DP_S_MOD;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
state = DP_S_MOD;
|
||||||
|
break;
|
||||||
|
case DP_S_MOD:
|
||||||
|
switch (ch)
|
||||||
|
{
|
||||||
|
case 'h':
|
||||||
|
cflags = DP_C_SHORT;
|
||||||
|
ch = *format++;
|
||||||
|
break;
|
||||||
|
case 'l':
|
||||||
|
cflags = DP_C_LONG;
|
||||||
|
ch = *format++;
|
||||||
|
if (ch == 'l') { /* It's a long long */
|
||||||
|
cflags = DP_C_LLONG;
|
||||||
|
ch = *format++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'L':
|
||||||
|
cflags = DP_C_LDOUBLE;
|
||||||
|
ch = *format++;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
state = DP_S_CONV;
|
||||||
|
break;
|
||||||
|
case DP_S_CONV:
|
||||||
|
switch (ch)
|
||||||
|
{
|
||||||
|
case 'd':
|
||||||
|
case 'i':
|
||||||
|
if (cflags == DP_C_SHORT)
|
||||||
|
value = va_arg (args, short int);
|
||||||
|
else if (cflags == DP_C_LONG)
|
||||||
|
value = va_arg (args, long int);
|
||||||
|
else if (cflags == DP_C_LLONG)
|
||||||
|
value = va_arg (args, LLONG);
|
||||||
|
else
|
||||||
|
value = va_arg (args, int);
|
||||||
|
fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
|
||||||
|
break;
|
||||||
|
case 'o':
|
||||||
|
flags |= DP_F_UNSIGNED;
|
||||||
|
if (cflags == DP_C_SHORT)
|
||||||
|
value = va_arg (args, unsigned short int);
|
||||||
|
else if (cflags == DP_C_LONG)
|
||||||
|
value = (long)va_arg (args, unsigned long int);
|
||||||
|
else if (cflags == DP_C_LLONG)
|
||||||
|
value = (long)va_arg (args, unsigned LLONG);
|
||||||
|
else
|
||||||
|
value = (long)va_arg (args, unsigned int);
|
||||||
|
fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags);
|
||||||
|
break;
|
||||||
|
case 'u':
|
||||||
|
flags |= DP_F_UNSIGNED;
|
||||||
|
if (cflags == DP_C_SHORT)
|
||||||
|
value = va_arg (args, unsigned short int);
|
||||||
|
else if (cflags == DP_C_LONG)
|
||||||
|
value = (long)va_arg (args, unsigned long int);
|
||||||
|
else if (cflags == DP_C_LLONG)
|
||||||
|
value = (LLONG)va_arg (args, unsigned LLONG);
|
||||||
|
else
|
||||||
|
value = (long)va_arg (args, unsigned int);
|
||||||
|
fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
|
||||||
|
break;
|
||||||
|
case 'X':
|
||||||
|
flags |= DP_F_UP;
|
||||||
|
case 'x':
|
||||||
|
flags |= DP_F_UNSIGNED;
|
||||||
|
if (cflags == DP_C_SHORT)
|
||||||
|
value = va_arg (args, unsigned short int);
|
||||||
|
else if (cflags == DP_C_LONG)
|
||||||
|
value = (long)va_arg (args, unsigned long int);
|
||||||
|
else if (cflags == DP_C_LLONG)
|
||||||
|
value = (LLONG)va_arg (args, unsigned LLONG);
|
||||||
|
else
|
||||||
|
value = (long)va_arg (args, unsigned int);
|
||||||
|
fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags);
|
||||||
|
break;
|
||||||
|
case 'f':
|
||||||
|
if (cflags == DP_C_LDOUBLE)
|
||||||
|
fvalue = va_arg (args, LDOUBLE);
|
||||||
|
else
|
||||||
|
fvalue = va_arg (args, double);
|
||||||
|
/* um, floating point? */
|
||||||
|
fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags);
|
||||||
|
break;
|
||||||
|
case 'E':
|
||||||
|
flags |= DP_F_UP;
|
||||||
|
case 'e':
|
||||||
|
if (cflags == DP_C_LDOUBLE)
|
||||||
|
fvalue = va_arg (args, LDOUBLE);
|
||||||
|
else
|
||||||
|
fvalue = va_arg (args, double);
|
||||||
|
break;
|
||||||
|
case 'G':
|
||||||
|
flags |= DP_F_UP;
|
||||||
|
case 'g':
|
||||||
|
if (cflags == DP_C_LDOUBLE)
|
||||||
|
fvalue = va_arg (args, LDOUBLE);
|
||||||
|
else
|
||||||
|
fvalue = va_arg (args, double);
|
||||||
|
break;
|
||||||
|
case 'c':
|
||||||
|
dopr_outch (buffer, &currlen, maxlen, va_arg (args, int));
|
||||||
|
break;
|
||||||
|
case 's':
|
||||||
|
strvalue = va_arg (args, char *);
|
||||||
|
if (max < 0)
|
||||||
|
max = maxlen; /* ie, no max */
|
||||||
|
fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max);
|
||||||
|
break;
|
||||||
|
case 'p':
|
||||||
|
strvalue = va_arg (args, void *);
|
||||||
|
fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags);
|
||||||
|
break;
|
||||||
|
case 'n':
|
||||||
|
if (cflags == DP_C_SHORT)
|
||||||
|
{
|
||||||
|
short int *num;
|
||||||
|
num = va_arg (args, short int *);
|
||||||
|
*num = currlen;
|
||||||
|
}
|
||||||
|
else if (cflags == DP_C_LONG)
|
||||||
|
{
|
||||||
|
long int *num;
|
||||||
|
num = va_arg (args, long int *);
|
||||||
|
*num = (long int)currlen;
|
||||||
|
}
|
||||||
|
else if (cflags == DP_C_LLONG)
|
||||||
|
{
|
||||||
|
LLONG *num;
|
||||||
|
num = va_arg (args, LLONG *);
|
||||||
|
*num = (LLONG)currlen;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int *num;
|
||||||
|
num = va_arg (args, int *);
|
||||||
|
*num = currlen;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case '%':
|
||||||
|
dopr_outch (buffer, &currlen, maxlen, ch);
|
||||||
|
break;
|
||||||
|
case 'w':
|
||||||
|
/* not supported yet, treat as next char */
|
||||||
|
ch = *format++;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
/* Unknown, skip */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
ch = *format++;
|
||||||
|
state = DP_S_DEFAULT;
|
||||||
|
flags = cflags = min = 0;
|
||||||
|
max = -1;
|
||||||
|
break;
|
||||||
|
case DP_S_DONE:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
/* hmm? */
|
||||||
|
break; /* some picky compilers need this */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (currlen < maxlen - 1)
|
||||||
|
buffer[currlen] = '\0';
|
||||||
|
else
|
||||||
|
buffer[maxlen - 1] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
|
char *value, int flags, int min, int max)
|
||||||
|
{
|
||||||
|
int padlen, strln; /* amount to pad */
|
||||||
|
int cnt = 0;
|
||||||
|
|
||||||
|
if (value == 0)
|
||||||
|
{
|
||||||
|
value = "<NULL>";
|
||||||
|
}
|
||||||
|
|
||||||
|
for (strln = 0; value[strln]; ++strln); /* strlen */
|
||||||
|
padlen = min - strln;
|
||||||
|
if (padlen < 0)
|
||||||
|
padlen = 0;
|
||||||
|
if (flags & DP_F_MINUS)
|
||||||
|
padlen = -padlen; /* Left Justify */
|
||||||
|
|
||||||
|
while ((padlen > 0) && (cnt < max))
|
||||||
|
{
|
||||||
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
|
--padlen;
|
||||||
|
++cnt;
|
||||||
|
}
|
||||||
|
while (*value && (cnt < max))
|
||||||
|
{
|
||||||
|
dopr_outch (buffer, currlen, maxlen, *value++);
|
||||||
|
++cnt;
|
||||||
|
}
|
||||||
|
while ((padlen < 0) && (cnt < max))
|
||||||
|
{
|
||||||
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
|
++padlen;
|
||||||
|
++cnt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */
|
||||||
|
|
||||||
|
static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
|
long value, int base, int min, int max, int flags)
|
||||||
|
{
|
||||||
|
int signvalue = 0;
|
||||||
|
unsigned long uvalue;
|
||||||
|
char convert[20];
|
||||||
|
int place = 0;
|
||||||
|
int spadlen = 0; /* amount to space pad */
|
||||||
|
int zpadlen = 0; /* amount to zero pad */
|
||||||
|
int caps = 0;
|
||||||
|
|
||||||
|
if (max < 0)
|
||||||
|
max = 0;
|
||||||
|
|
||||||
|
uvalue = value;
|
||||||
|
|
||||||
|
if(!(flags & DP_F_UNSIGNED))
|
||||||
|
{
|
||||||
|
if( value < 0 ) {
|
||||||
|
signvalue = '-';
|
||||||
|
uvalue = -value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (flags & DP_F_PLUS) /* Do a sign (+/i) */
|
||||||
|
signvalue = '+';
|
||||||
|
else
|
||||||
|
if (flags & DP_F_SPACE)
|
||||||
|
signvalue = ' ';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
|
||||||
|
|
||||||
|
do {
|
||||||
|
convert[place++] =
|
||||||
|
(caps? "0123456789ABCDEF":"0123456789abcdef")
|
||||||
|
[uvalue % (unsigned)base ];
|
||||||
|
uvalue = (uvalue / (unsigned)base );
|
||||||
|
} while(uvalue && (place < 20));
|
||||||
|
if (place == 20) place--;
|
||||||
|
convert[place] = 0;
|
||||||
|
|
||||||
|
zpadlen = max - place;
|
||||||
|
spadlen = min - MAX (max, place) - (signvalue ? 1 : 0);
|
||||||
|
if (zpadlen < 0) zpadlen = 0;
|
||||||
|
if (spadlen < 0) spadlen = 0;
|
||||||
|
if (flags & DP_F_ZERO)
|
||||||
|
{
|
||||||
|
zpadlen = MAX(zpadlen, spadlen);
|
||||||
|
spadlen = 0;
|
||||||
|
}
|
||||||
|
if (flags & DP_F_MINUS)
|
||||||
|
spadlen = -spadlen; /* Left Justifty */
|
||||||
|
|
||||||
|
#ifdef DEBUG_SNPRINTF
|
||||||
|
printf("zpad: %d, spad: %d, min: %d, max: %d, place: %d\n",
|
||||||
|
zpadlen, spadlen, min, max, place);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Spaces */
|
||||||
|
while (spadlen > 0)
|
||||||
|
{
|
||||||
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
|
--spadlen;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sign */
|
||||||
|
if (signvalue)
|
||||||
|
dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||||
|
|
||||||
|
/* Zeros */
|
||||||
|
if (zpadlen > 0)
|
||||||
|
{
|
||||||
|
while (zpadlen > 0)
|
||||||
|
{
|
||||||
|
dopr_outch (buffer, currlen, maxlen, '0');
|
||||||
|
--zpadlen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Digits */
|
||||||
|
while (place > 0)
|
||||||
|
dopr_outch (buffer, currlen, maxlen, convert[--place]);
|
||||||
|
|
||||||
|
/* Left Justified spaces */
|
||||||
|
while (spadlen < 0) {
|
||||||
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
|
++spadlen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static LDOUBLE abs_val (LDOUBLE value)
|
||||||
|
{
|
||||||
|
LDOUBLE result = value;
|
||||||
|
|
||||||
|
if (value < 0)
|
||||||
|
result = -value;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static LDOUBLE pow10 (int exp)
|
||||||
|
{
|
||||||
|
LDOUBLE result = 1;
|
||||||
|
|
||||||
|
while (exp)
|
||||||
|
{
|
||||||
|
result *= 10;
|
||||||
|
exp--;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
static long round (LDOUBLE value)
|
||||||
|
{
|
||||||
|
long intpart;
|
||||||
|
|
||||||
|
intpart = (long)value;
|
||||||
|
value = value - intpart;
|
||||||
|
if (value >= 0.5)
|
||||||
|
intpart++;
|
||||||
|
|
||||||
|
return intpart;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
|
||||||
|
LDOUBLE fvalue, int min, int max, int flags)
|
||||||
|
{
|
||||||
|
int signvalue = 0;
|
||||||
|
LDOUBLE ufvalue;
|
||||||
|
#ifndef HAVE_FCVT
|
||||||
|
char iconvert[20];
|
||||||
|
char fconvert[20];
|
||||||
|
#else
|
||||||
|
char iconvert[311];
|
||||||
|
char fconvert[311];
|
||||||
|
char *result;
|
||||||
|
int dec_pt, sig;
|
||||||
|
int r_length;
|
||||||
|
# ifdef HAVE_FCVTL
|
||||||
|
extern char *fcvtl(long double value, int ndigit, int *decpt, int *sign);
|
||||||
|
# else
|
||||||
|
extern char *fcvt(double value, int ndigit, int *decpt, int *sign);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
int iplace = 0;
|
||||||
|
int fplace = 0;
|
||||||
|
int padlen = 0; /* amount to pad */
|
||||||
|
int zpadlen = 0;
|
||||||
|
int caps = 0;
|
||||||
|
long intpart;
|
||||||
|
long fracpart;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* AIX manpage says the default is 0, but Solaris says the default
|
||||||
|
* is 6, and sprintf on AIX defaults to 6
|
||||||
|
*/
|
||||||
|
if (max < 0)
|
||||||
|
max = 6;
|
||||||
|
|
||||||
|
ufvalue = abs_val (fvalue);
|
||||||
|
|
||||||
|
if (fvalue < 0)
|
||||||
|
signvalue = '-';
|
||||||
|
else
|
||||||
|
if (flags & DP_F_PLUS) /* Do a sign (+/i) */
|
||||||
|
signvalue = '+';
|
||||||
|
else
|
||||||
|
if (flags & DP_F_SPACE)
|
||||||
|
signvalue = ' ';
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_FCVT
|
||||||
|
intpart = (long)ufvalue;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sorry, we only support 9 digits past the decimal because of our
|
||||||
|
* conversion method
|
||||||
|
*/
|
||||||
|
if (max > 9)
|
||||||
|
max = 9;
|
||||||
|
|
||||||
|
/* We "cheat" by converting the fractional part to integer by
|
||||||
|
* multiplying by a factor of 10
|
||||||
|
*/
|
||||||
|
fracpart = round ((pow10 (max)) * (ufvalue - intpart));
|
||||||
|
|
||||||
|
if (fracpart >= pow10 (max))
|
||||||
|
{
|
||||||
|
intpart++;
|
||||||
|
fracpart -= pow10 (max);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef DEBUG_SNPRINTF
|
||||||
|
printf("fmtfp: %g %d.%d min=%d max=%d\n",
|
||||||
|
(double)fvalue, intpart, fracpart, min, max);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Convert integer part */
|
||||||
|
do {
|
||||||
|
iconvert[iplace++] =
|
||||||
|
(caps? "0123456789ABCDEF":"0123456789abcdef")[intpart % 10];
|
||||||
|
intpart = (intpart / 10);
|
||||||
|
} while(intpart && (iplace < 20));
|
||||||
|
if (iplace == 20) iplace--;
|
||||||
|
iconvert[iplace] = 0;
|
||||||
|
|
||||||
|
/* Convert fractional part */
|
||||||
|
do {
|
||||||
|
fconvert[fplace++] =
|
||||||
|
(caps? "0123456789ABCDEF":"0123456789abcdef")[fracpart % 10];
|
||||||
|
fracpart = (fracpart / 10);
|
||||||
|
} while(fracpart && (fplace < 20));
|
||||||
|
if (fplace == 20) fplace--;
|
||||||
|
fconvert[fplace] = 0;
|
||||||
|
#else /* use fcvt() */
|
||||||
|
if (max > 310)
|
||||||
|
max = 310;
|
||||||
|
# ifdef HAVE_FCVTL
|
||||||
|
result = fcvtl(ufvalue, max, &dec_pt, &sig);
|
||||||
|
# else
|
||||||
|
result = fcvt(ufvalue, max, &dec_pt, &sig);
|
||||||
|
# endif
|
||||||
|
|
||||||
|
r_length = strlen(result);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fix broken fcvt implementation returns..
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (r_length == 0)
|
||||||
|
{
|
||||||
|
result[0] = '0';
|
||||||
|
result[1] = '\0';
|
||||||
|
r_length = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( r_length < dec_pt )
|
||||||
|
dec_pt = r_length;
|
||||||
|
|
||||||
|
if (dec_pt <= 0) {
|
||||||
|
iplace = 1;
|
||||||
|
iconvert[0] = '0';
|
||||||
|
iconvert[1] = '\0';
|
||||||
|
|
||||||
|
fplace = 0;
|
||||||
|
|
||||||
|
while(r_length)
|
||||||
|
fconvert[fplace++] = result[--r_length];
|
||||||
|
|
||||||
|
while ((dec_pt < 0) && (fplace < max)) {
|
||||||
|
fconvert[fplace++] = '0';
|
||||||
|
dec_pt++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
int c;
|
||||||
|
|
||||||
|
iplace=0;
|
||||||
|
for(c=dec_pt; c; iconvert[iplace++] = result[--c])
|
||||||
|
;
|
||||||
|
iconvert[iplace] = '\0';
|
||||||
|
|
||||||
|
result += dec_pt;
|
||||||
|
fplace = 0;
|
||||||
|
|
||||||
|
for(c=(r_length-dec_pt); c; fconvert[fplace++] = result[--c])
|
||||||
|
;
|
||||||
|
}
|
||||||
|
#endif /* fcvt */
|
||||||
|
|
||||||
|
/* -1 for decimal point, another -1 if we are printing a sign */
|
||||||
|
padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
|
||||||
|
zpadlen = max - fplace;
|
||||||
|
if (zpadlen < 0)
|
||||||
|
zpadlen = 0;
|
||||||
|
if (padlen < 0)
|
||||||
|
padlen = 0;
|
||||||
|
if (flags & DP_F_MINUS)
|
||||||
|
padlen = -padlen; /* Left Justifty */
|
||||||
|
|
||||||
|
if ((flags & DP_F_ZERO) && (padlen > 0))
|
||||||
|
{
|
||||||
|
if (signvalue)
|
||||||
|
{
|
||||||
|
dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||||
|
--padlen;
|
||||||
|
signvalue = 0;
|
||||||
|
}
|
||||||
|
while (padlen > 0)
|
||||||
|
{
|
||||||
|
dopr_outch (buffer, currlen, maxlen, '0');
|
||||||
|
--padlen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (padlen > 0)
|
||||||
|
{
|
||||||
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
|
--padlen;
|
||||||
|
}
|
||||||
|
if (signvalue)
|
||||||
|
dopr_outch (buffer, currlen, maxlen, signvalue);
|
||||||
|
|
||||||
|
while (iplace > 0)
|
||||||
|
dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef DEBUG_SNPRINTF
|
||||||
|
printf("fmtfp: fplace=%d zpadlen=%d\n", fplace, zpadlen);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Decimal point. This should probably use locale to find the correct
|
||||||
|
* char to print out.
|
||||||
|
*/
|
||||||
|
if (max > 0) {
|
||||||
|
dopr_outch (buffer, currlen, maxlen, '.');
|
||||||
|
|
||||||
|
while (fplace > 0)
|
||||||
|
dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
|
||||||
|
}
|
||||||
|
|
||||||
|
while (zpadlen > 0)
|
||||||
|
{
|
||||||
|
dopr_outch (buffer, currlen, maxlen, '0');
|
||||||
|
--zpadlen;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (padlen < 0)
|
||||||
|
{
|
||||||
|
dopr_outch (buffer, currlen, maxlen, ' ');
|
||||||
|
++padlen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c)
|
||||||
|
{
|
||||||
|
if (*currlen < maxlen)
|
||||||
|
buffer[(*currlen)++] = c;
|
||||||
|
}
|
||||||
|
#endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */
|
||||||
|
|
||||||
|
#ifndef HAVE_VSNPRINTF
|
||||||
|
int vsnprintf (char *str, size_t count, const char *fmt, va_list args)
|
||||||
|
{
|
||||||
|
str[0] = 0;
|
||||||
|
dopr(str, count, fmt, args);
|
||||||
|
return(strlen(str));
|
||||||
|
}
|
||||||
|
#endif /* !HAVE_VSNPRINTF */
|
||||||
|
|
||||||
|
#ifndef HAVE_SNPRINTF
|
||||||
|
/* VARARGS3 */
|
||||||
|
#ifdef HAVE_STDARGS
|
||||||
|
int snprintf (char *str,size_t count,const char *fmt,...)
|
||||||
|
#else
|
||||||
|
int snprintf (va_alist) va_dcl
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
#ifndef HAVE_STDARGS
|
||||||
|
char *str;
|
||||||
|
size_t count;
|
||||||
|
char *fmt;
|
||||||
|
#endif
|
||||||
|
VA_LOCAL_DECL;
|
||||||
|
|
||||||
|
VA_START (fmt);
|
||||||
|
VA_SHIFT (str, char *);
|
||||||
|
VA_SHIFT (count, size_t );
|
||||||
|
VA_SHIFT (fmt, char *);
|
||||||
|
(void) vsnprintf(str, count, fmt, ap);
|
||||||
|
VA_END;
|
||||||
|
return(strlen(str));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#else
|
||||||
|
/* keep compilers happy about empty files */
|
||||||
|
void dummy_snprintf(void) {}
|
||||||
|
#endif /* !HAVE_SNPRINTF */
|
||||||
|
|
||||||
|
#ifdef TEST_SNPRINTF
|
||||||
|
#ifndef LONG_STRING
|
||||||
|
#define LONG_STRING 1024
|
||||||
|
#endif
|
||||||
|
int main (void)
|
||||||
|
{
|
||||||
|
char buf1[LONG_STRING];
|
||||||
|
char buf2[LONG_STRING];
|
||||||
|
char *fp_fmt[] = {
|
||||||
|
"%-1.5f",
|
||||||
|
"%1.5f",
|
||||||
|
"%123.9f",
|
||||||
|
"%10.5f",
|
||||||
|
"% 10.5f",
|
||||||
|
"%+22.9f",
|
||||||
|
"%+4.9f",
|
||||||
|
"%01.3f",
|
||||||
|
"%4f",
|
||||||
|
"%3.1f",
|
||||||
|
"%3.2f",
|
||||||
|
"%.0f",
|
||||||
|
"%.1f",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996,
|
||||||
|
0.9996, 1.996, 4.136, 6442452944.1234, 0};
|
||||||
|
char *int_fmt[] = {
|
||||||
|
"%-1.5d",
|
||||||
|
"%1.5d",
|
||||||
|
"%123.9d",
|
||||||
|
"%5.5d",
|
||||||
|
"%10.5d",
|
||||||
|
"% 10.5d",
|
||||||
|
"%+22.33d",
|
||||||
|
"%01.3d",
|
||||||
|
"%4d",
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
long int_nums[] = { -1, 134, 91340, 341, 0203, 0};
|
||||||
|
int x, y;
|
||||||
|
int fail = 0;
|
||||||
|
int num = 0;
|
||||||
|
|
||||||
|
printf ("Testing snprintf format codes against system sprintf...\n");
|
||||||
|
|
||||||
|
for (x = 0; fp_fmt[x] != NULL ; x++)
|
||||||
|
for (y = 0; fp_nums[y] != 0 ; y++)
|
||||||
|
{
|
||||||
|
snprintf (buf1, sizeof (buf1), fp_fmt[x], fp_nums[y]);
|
||||||
|
sprintf (buf2, fp_fmt[x], fp_nums[y]);
|
||||||
|
if (strcmp (buf1, buf2))
|
||||||
|
{
|
||||||
|
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
|
||||||
|
fp_fmt[x], buf1, buf2);
|
||||||
|
fail++;
|
||||||
|
}
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (x = 0; int_fmt[x] != NULL ; x++)
|
||||||
|
for (y = 0; int_nums[y] != 0 ; y++)
|
||||||
|
{
|
||||||
|
snprintf (buf1, sizeof (buf1), int_fmt[x], int_nums[y]);
|
||||||
|
sprintf (buf2, int_fmt[x], int_nums[y]);
|
||||||
|
if (strcmp (buf1, buf2))
|
||||||
|
{
|
||||||
|
printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf = %s\n",
|
||||||
|
int_fmt[x], buf1, buf2);
|
||||||
|
fail++;
|
||||||
|
}
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
printf ("%d tests failed out of %d.\n", fail, num);
|
||||||
|
}
|
||||||
|
#endif /* SNPRINTF_TEST */
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include "state.h"
|
#include "state.h"
|
||||||
#include "parseconf.h"
|
#include "parseconf.h"
|
||||||
|
|
||||||
static void val_escape(struct st_tree_t *node)
|
static void val_escape(st_tree_t *node)
|
||||||
{
|
{
|
||||||
char etmp[ST_MAX_VALUE_LEN];
|
char etmp[ST_MAX_VALUE_LEN];
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ static void val_escape(struct st_tree_t *node)
|
||||||
node->val = node->safe;
|
node->val = node->safe;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void st_tree_enum_free(struct enum_t *list)
|
static void st_tree_enum_free(enum_t *list)
|
||||||
{
|
{
|
||||||
if (!list) {
|
if (!list) {
|
||||||
return;
|
return;
|
||||||
|
@ -66,7 +66,7 @@ static void st_tree_enum_free(struct enum_t *list)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* free all memory associated with a node */
|
/* free all memory associated with a node */
|
||||||
static void st_tree_node_free(struct st_tree_t *node)
|
static void st_tree_node_free(st_tree_t *node)
|
||||||
{
|
{
|
||||||
free(node->var);
|
free(node->var);
|
||||||
free(node->raw);
|
free(node->raw);
|
||||||
|
@ -82,7 +82,7 @@ static void st_tree_node_free(struct st_tree_t *node)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add a subtree to another subtree */
|
/* add a subtree to another subtree */
|
||||||
static void st_tree_node_add(struct st_tree_t **nptr, struct st_tree_t *sptr)
|
static void st_tree_node_add(st_tree_t **nptr, st_tree_t *sptr)
|
||||||
{
|
{
|
||||||
if (!sptr) {
|
if (!sptr) {
|
||||||
return;
|
return;
|
||||||
|
@ -90,7 +90,7 @@ static void st_tree_node_add(struct st_tree_t **nptr, struct st_tree_t *sptr)
|
||||||
|
|
||||||
while (*nptr) {
|
while (*nptr) {
|
||||||
|
|
||||||
struct st_tree_t *node = *nptr;
|
st_tree_t *node = *nptr;
|
||||||
|
|
||||||
if (strcasecmp(node->var, sptr->var) > 0) {
|
if (strcasecmp(node->var, sptr->var) > 0) {
|
||||||
nptr = &node->left;
|
nptr = &node->left;
|
||||||
|
@ -110,11 +110,11 @@ static void st_tree_node_add(struct st_tree_t **nptr, struct st_tree_t *sptr)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* remove a variable from a tree */
|
/* remove a variable from a tree */
|
||||||
int state_delinfo(struct st_tree_t **nptr, const char *var)
|
int state_delinfo(st_tree_t **nptr, const char *var)
|
||||||
{
|
{
|
||||||
while (*nptr) {
|
while (*nptr) {
|
||||||
|
|
||||||
struct st_tree_t *node = *nptr;
|
st_tree_t *node = *nptr;
|
||||||
|
|
||||||
if (strcasecmp(node->var, var) > 0) {
|
if (strcasecmp(node->var, var) > 0) {
|
||||||
nptr = &node->left;
|
nptr = &node->left;
|
||||||
|
@ -142,11 +142,11 @@ int state_delinfo(struct st_tree_t **nptr, const char *var)
|
||||||
|
|
||||||
/* interface */
|
/* interface */
|
||||||
|
|
||||||
int state_setinfo(struct st_tree_t **nptr, const char *var, const char *val)
|
int state_setinfo(st_tree_t **nptr, const char *var, const char *val)
|
||||||
{
|
{
|
||||||
while (*nptr) {
|
while (*nptr) {
|
||||||
|
|
||||||
struct st_tree_t *node = *nptr;
|
st_tree_t *node = *nptr;
|
||||||
|
|
||||||
if (strcasecmp(node->var, var) > 0) {
|
if (strcasecmp(node->var, var) > 0) {
|
||||||
nptr = &node->left;
|
nptr = &node->left;
|
||||||
|
@ -193,9 +193,9 @@ int state_setinfo(struct st_tree_t **nptr, const char *var, const char *val)
|
||||||
return 1; /* added */
|
return 1; /* added */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int st_tree_enum_add(struct enum_t **list, const char *enc)
|
static int st_tree_enum_add(enum_t **list, const char *enc)
|
||||||
{
|
{
|
||||||
struct enum_t *item;
|
enum_t *item;
|
||||||
|
|
||||||
while (*list) {
|
while (*list) {
|
||||||
|
|
||||||
|
@ -217,9 +217,9 @@ static int st_tree_enum_add(struct enum_t **list, const char *enc)
|
||||||
return 1; /* added */
|
return 1; /* added */
|
||||||
}
|
}
|
||||||
|
|
||||||
int state_addenum(struct st_tree_t *root, const char *var, const char *val)
|
int state_addenum(st_tree_t *root, const char *var, const char *val)
|
||||||
{
|
{
|
||||||
struct st_tree_t *sttmp;
|
st_tree_t *sttmp;
|
||||||
char enc[ST_MAX_VALUE_LEN];
|
char enc[ST_MAX_VALUE_LEN];
|
||||||
|
|
||||||
/* find the tree node for var */
|
/* find the tree node for var */
|
||||||
|
@ -237,9 +237,9 @@ int state_addenum(struct st_tree_t *root, const char *var, const char *val)
|
||||||
return st_tree_enum_add(&sttmp->enum_list, enc);
|
return st_tree_enum_add(&sttmp->enum_list, enc);
|
||||||
}
|
}
|
||||||
|
|
||||||
int state_setaux(struct st_tree_t *root, const char *var, const char *auxs)
|
int state_setaux(st_tree_t *root, const char *var, const char *auxs)
|
||||||
{
|
{
|
||||||
struct st_tree_t *sttmp;
|
st_tree_t *sttmp;
|
||||||
int aux;
|
int aux;
|
||||||
|
|
||||||
/* find the tree node for var */
|
/* find the tree node for var */
|
||||||
|
@ -263,9 +263,9 @@ int state_setaux(struct st_tree_t *root, const char *var, const char *auxs)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *state_getinfo(struct st_tree_t *root, const char *var)
|
const char *state_getinfo(st_tree_t *root, const char *var)
|
||||||
{
|
{
|
||||||
struct st_tree_t *sttmp;
|
st_tree_t *sttmp;
|
||||||
|
|
||||||
/* find the tree node for var */
|
/* find the tree node for var */
|
||||||
sttmp = state_tree_find(root, var);
|
sttmp = state_tree_find(root, var);
|
||||||
|
@ -277,9 +277,9 @@ const char *state_getinfo(struct st_tree_t *root, const char *var)
|
||||||
return sttmp->val;
|
return sttmp->val;
|
||||||
}
|
}
|
||||||
|
|
||||||
int state_getflags(struct st_tree_t *root, const char *var)
|
int state_getflags(st_tree_t *root, const char *var)
|
||||||
{
|
{
|
||||||
struct st_tree_t *sttmp;
|
st_tree_t *sttmp;
|
||||||
|
|
||||||
/* find the tree node for var */
|
/* find the tree node for var */
|
||||||
sttmp = state_tree_find(root, var);
|
sttmp = state_tree_find(root, var);
|
||||||
|
@ -291,9 +291,9 @@ int state_getflags(struct st_tree_t *root, const char *var)
|
||||||
return sttmp->flags;
|
return sttmp->flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
int state_getaux(struct st_tree_t *root, const char *var)
|
int state_getaux(st_tree_t *root, const char *var)
|
||||||
{
|
{
|
||||||
struct st_tree_t *sttmp;
|
st_tree_t *sttmp;
|
||||||
|
|
||||||
/* find the tree node for var */
|
/* find the tree node for var */
|
||||||
sttmp = state_tree_find(root, var);
|
sttmp = state_tree_find(root, var);
|
||||||
|
@ -305,9 +305,9 @@ int state_getaux(struct st_tree_t *root, const char *var)
|
||||||
return sttmp->aux;
|
return sttmp->aux;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct enum_t *state_getenumlist(struct st_tree_t *root, const char *var)
|
const enum_t *state_getenumlist(st_tree_t *root, const char *var)
|
||||||
{
|
{
|
||||||
struct st_tree_t *sttmp;
|
st_tree_t *sttmp;
|
||||||
|
|
||||||
/* find the tree node for var */
|
/* find the tree node for var */
|
||||||
sttmp = state_tree_find(root, var);
|
sttmp = state_tree_find(root, var);
|
||||||
|
@ -319,10 +319,10 @@ const struct enum_t *state_getenumlist(struct st_tree_t *root, const char *var)
|
||||||
return sttmp->enum_list;
|
return sttmp->enum_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
void state_setflags(struct st_tree_t *root, const char *var, int numflags, char **flag)
|
void state_setflags(st_tree_t *root, const char *var, int numflags, char **flag)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct st_tree_t *sttmp;
|
st_tree_t *sttmp;
|
||||||
|
|
||||||
/* find the tree node for var */
|
/* find the tree node for var */
|
||||||
sttmp = state_tree_find(root, var);
|
sttmp = state_tree_find(root, var);
|
||||||
|
@ -351,9 +351,9 @@ void state_setflags(struct st_tree_t *root, const char *var, int numflags, char
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int state_addcmd(struct cmdlist_t **list, const char *cmd)
|
int state_addcmd(cmdlist_t **list, const char *cmd)
|
||||||
{
|
{
|
||||||
struct cmdlist_t *item;
|
cmdlist_t *item;
|
||||||
|
|
||||||
while (*list) {
|
while (*list) {
|
||||||
|
|
||||||
|
@ -380,7 +380,7 @@ int state_addcmd(struct cmdlist_t **list, const char *cmd)
|
||||||
return 1; /* added */
|
return 1; /* added */
|
||||||
}
|
}
|
||||||
|
|
||||||
void state_infofree(struct st_tree_t *node)
|
void state_infofree(st_tree_t *node)
|
||||||
{
|
{
|
||||||
if (!node) {
|
if (!node) {
|
||||||
return;
|
return;
|
||||||
|
@ -392,7 +392,7 @@ void state_infofree(struct st_tree_t *node)
|
||||||
st_tree_node_free(node);
|
st_tree_node_free(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
void state_cmdfree(struct cmdlist_t *list)
|
void state_cmdfree(cmdlist_t *list)
|
||||||
{
|
{
|
||||||
if (!list) {
|
if (!list) {
|
||||||
return;
|
return;
|
||||||
|
@ -404,11 +404,11 @@ void state_cmdfree(struct cmdlist_t *list)
|
||||||
free(list);
|
free(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
int state_delcmd(struct cmdlist_t **list, const char *cmd)
|
int state_delcmd(cmdlist_t **list, const char *cmd)
|
||||||
{
|
{
|
||||||
while (*list) {
|
while (*list) {
|
||||||
|
|
||||||
struct cmdlist_t *item = *list;
|
cmdlist_t *item = *list;
|
||||||
|
|
||||||
if (strcasecmp(item->name, cmd) > 0) {
|
if (strcasecmp(item->name, cmd) > 0) {
|
||||||
/* not found */
|
/* not found */
|
||||||
|
@ -433,11 +433,11 @@ int state_delcmd(struct cmdlist_t **list, const char *cmd)
|
||||||
return 0; /* not found */
|
return 0; /* not found */
|
||||||
}
|
}
|
||||||
|
|
||||||
static int st_tree_del_enum(struct enum_t **list, const char *val)
|
static int st_tree_del_enum(enum_t **list, const char *val)
|
||||||
{
|
{
|
||||||
while (*list) {
|
while (*list) {
|
||||||
|
|
||||||
struct enum_t *item = *list;
|
enum_t *item = *list;
|
||||||
|
|
||||||
/* if this is not the right value, go on to the next */
|
/* if this is not the right value, go on to the next */
|
||||||
if (strcasecmp(item->val, val)) {
|
if (strcasecmp(item->val, val)) {
|
||||||
|
@ -457,9 +457,9 @@ static int st_tree_del_enum(struct enum_t **list, const char *val)
|
||||||
return 0; /* not found */
|
return 0; /* not found */
|
||||||
}
|
}
|
||||||
|
|
||||||
int state_delenum(struct st_tree_t *root, const char *var, const char *val)
|
int state_delenum(st_tree_t *root, const char *var, const char *val)
|
||||||
{
|
{
|
||||||
struct st_tree_t *sttmp;
|
st_tree_t *sttmp;
|
||||||
|
|
||||||
/* find the tree node for var */
|
/* find the tree node for var */
|
||||||
sttmp = state_tree_find(root, var);
|
sttmp = state_tree_find(root, var);
|
||||||
|
@ -471,7 +471,7 @@ int state_delenum(struct st_tree_t *root, const char *var, const char *val)
|
||||||
return st_tree_del_enum(&sttmp->enum_list, val);
|
return st_tree_del_enum(&sttmp->enum_list, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct st_tree_t *state_tree_find(struct st_tree_t *node, const char *var)
|
st_tree_t *state_tree_find(st_tree_t *node, const char *var)
|
||||||
{
|
{
|
||||||
while (node) {
|
while (node) {
|
||||||
|
|
||||||
|
|
503
common/strerror.c
Normal file
|
@ -0,0 +1,503 @@
|
||||||
|
/* strerror() Mark Powell <medp@primagraphics.co.uk> */
|
||||||
|
/* Simple implementation derived from libiberty */
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifndef HAVE_STRERROR
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
char *strerror(int errnum)
|
||||||
|
{
|
||||||
|
static char buf[32];
|
||||||
|
|
||||||
|
switch (errnum) {
|
||||||
|
#if defined (EPERM)
|
||||||
|
case EPERM:
|
||||||
|
return "Not owner";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOENT)
|
||||||
|
case ENOENT:
|
||||||
|
return "No such file or directory";
|
||||||
|
#endif
|
||||||
|
#if defined (ESRCH)
|
||||||
|
case ESRCH:
|
||||||
|
return "No such process";
|
||||||
|
#endif
|
||||||
|
#if defined (EINTR)
|
||||||
|
case EINTR:
|
||||||
|
return "Interrupted system call";
|
||||||
|
#endif
|
||||||
|
#if defined (EIO)
|
||||||
|
case EIO:
|
||||||
|
return "I/O error";
|
||||||
|
#endif
|
||||||
|
#if defined (ENXIO)
|
||||||
|
case ENXIO:
|
||||||
|
return "No such device or address";
|
||||||
|
#endif
|
||||||
|
#if defined (E2BIG)
|
||||||
|
return "Arg list too long";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOEXEC)
|
||||||
|
case ENOEXEC:
|
||||||
|
return "Exec format error";
|
||||||
|
#endif
|
||||||
|
#if defined (EBADF)
|
||||||
|
case EBADF:
|
||||||
|
return "Bad file number";
|
||||||
|
#endif
|
||||||
|
#if defined (ECHILD)
|
||||||
|
case ECHILD:
|
||||||
|
return "No child processes";
|
||||||
|
#endif
|
||||||
|
#if defined (EWOULDBLOCK) /* Put before EAGAIN, sometimes aliased */
|
||||||
|
case EWOULDBLOCK:
|
||||||
|
return "Operation would block";
|
||||||
|
#endif
|
||||||
|
#if defined (EAGAIN)
|
||||||
|
#if defined (EWOULDBLOCK) && EAGAIN != EWOULDBLOCK
|
||||||
|
case EAGAIN:
|
||||||
|
return "No more processes";
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if defined (ENOMEM)
|
||||||
|
case ENOMEM:
|
||||||
|
return "Not enough space";
|
||||||
|
#endif
|
||||||
|
#if defined (EACCES)
|
||||||
|
case EACCES:
|
||||||
|
return "Permission denied";
|
||||||
|
#endif
|
||||||
|
#if defined (EFAULT)
|
||||||
|
case EFAULT:
|
||||||
|
return "Bad address";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOTBLK)
|
||||||
|
case ENOTBLK:
|
||||||
|
return "Block device required";
|
||||||
|
#endif
|
||||||
|
#if defined (EBUSY)
|
||||||
|
case EBUSY:
|
||||||
|
return "Device busy";
|
||||||
|
#endif
|
||||||
|
#if defined (EEXIST)
|
||||||
|
case EEXIST:
|
||||||
|
return "File exists";
|
||||||
|
#endif
|
||||||
|
#if defined (EXDEV)
|
||||||
|
case EXDEV:
|
||||||
|
return "Cross-device link";
|
||||||
|
#endif
|
||||||
|
#if defined (ENODEV)
|
||||||
|
case ENODEV:
|
||||||
|
return "No such device";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOTDIR)
|
||||||
|
case ENOTDIR:
|
||||||
|
return "Not a directory";
|
||||||
|
#endif
|
||||||
|
#if defined (EISDIR)
|
||||||
|
case EISDIR:
|
||||||
|
return "Is a directory";
|
||||||
|
#endif
|
||||||
|
#if defined (EINVAL)
|
||||||
|
case EINVAL:
|
||||||
|
return "Invalid argument";
|
||||||
|
#endif
|
||||||
|
#if defined (ENFILE)
|
||||||
|
case ENFILE:
|
||||||
|
return "File table overflow";
|
||||||
|
#endif
|
||||||
|
#if defined (EMFILE)
|
||||||
|
case EMFILE:
|
||||||
|
return "Too many open files";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOTTY)
|
||||||
|
case ENOTTY:
|
||||||
|
return "Not a typewriter";
|
||||||
|
#endif
|
||||||
|
#if defined (ETXTBSY)
|
||||||
|
case ETXTBSY:
|
||||||
|
return "Text file busy";
|
||||||
|
#endif
|
||||||
|
#if defined (EFBIG)
|
||||||
|
case EFBIG:
|
||||||
|
return "File too large";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOSPC)
|
||||||
|
case ENOSPC:
|
||||||
|
return "No space left on device";
|
||||||
|
#endif
|
||||||
|
#if defined (ESPIPE)
|
||||||
|
case ESPIPE:
|
||||||
|
return "Illegal seek";
|
||||||
|
#endif
|
||||||
|
#if defined (EROFS)
|
||||||
|
case EROFS:
|
||||||
|
return "Read-only file system";
|
||||||
|
#endif
|
||||||
|
#if defined (EMLINK)
|
||||||
|
case EMLINK:
|
||||||
|
return "Too many links";
|
||||||
|
#endif
|
||||||
|
#if defined (EPIPE)
|
||||||
|
case EPIPE:
|
||||||
|
return "Broken pipe";
|
||||||
|
#endif
|
||||||
|
#if defined (EDOM)
|
||||||
|
case EDOM:
|
||||||
|
return "Math argument out of domain of func";
|
||||||
|
#endif
|
||||||
|
#if defined (ERANGE)
|
||||||
|
case ERANGE:
|
||||||
|
return "Math result not representable";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOMSG)
|
||||||
|
case ENOMSG:
|
||||||
|
return "No message of desired type";
|
||||||
|
#endif
|
||||||
|
#if defined (EIDRM)
|
||||||
|
case EIDRM:
|
||||||
|
return "Identifier removed";
|
||||||
|
#endif
|
||||||
|
#if defined (ECHRNG)
|
||||||
|
case ECHRNG:
|
||||||
|
return "Channel number out of range";
|
||||||
|
#endif
|
||||||
|
#if defined (EL2NSYNC)
|
||||||
|
return "Level 2 not synchronized";
|
||||||
|
#endif
|
||||||
|
#if defined (EL3HLT)
|
||||||
|
return "Level 3 halted";
|
||||||
|
#endif
|
||||||
|
#if defined (EL3RST)
|
||||||
|
return "Level 3 reset";
|
||||||
|
#endif
|
||||||
|
#if defined (ELNRNG)
|
||||||
|
case ELNRNG:
|
||||||
|
return "Link number out of range";
|
||||||
|
#endif
|
||||||
|
#if defined (EUNATCH)
|
||||||
|
case EUNATCH:
|
||||||
|
return "Protocol driver not attached";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOCSI)
|
||||||
|
case ENOCSI:
|
||||||
|
return "No CSI structure available";
|
||||||
|
#endif
|
||||||
|
#if defined (EL2HLT)
|
||||||
|
return "Level 2 halted";
|
||||||
|
#endif
|
||||||
|
#if defined (EDEADLK)
|
||||||
|
case EDEADLK:
|
||||||
|
return "Deadlock condition";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOLCK)
|
||||||
|
case ENOLCK:
|
||||||
|
return "No record locks available";
|
||||||
|
#endif
|
||||||
|
#if defined (EBADE)
|
||||||
|
case EBADE:
|
||||||
|
return "Invalid exchange";
|
||||||
|
#endif
|
||||||
|
#if defined (EBADR)
|
||||||
|
case EBADR:
|
||||||
|
return "Invalid request descriptor";
|
||||||
|
#endif
|
||||||
|
#if defined (EXFULL)
|
||||||
|
case EXFULL:
|
||||||
|
return "Exchange full";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOANO)
|
||||||
|
case ENOANO:
|
||||||
|
return "No anode";
|
||||||
|
#endif
|
||||||
|
#if defined (EBADRQC)
|
||||||
|
case EBADRQC:
|
||||||
|
return "Invalid request code";
|
||||||
|
#endif
|
||||||
|
#if defined (EBADSLT)
|
||||||
|
case EBADSLT:
|
||||||
|
return "Invalid slot";
|
||||||
|
#endif
|
||||||
|
#if defined (EDEADLOCK)
|
||||||
|
case EDEADLOCK:
|
||||||
|
return "File locking deadlock error";
|
||||||
|
#endif
|
||||||
|
#if defined (EBFONT)
|
||||||
|
case EBFONT:
|
||||||
|
return "Bad font file format";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOSTR)
|
||||||
|
case ENOSTR:
|
||||||
|
return "Device not a stream";
|
||||||
|
#endif
|
||||||
|
#if defined (ENODATA)
|
||||||
|
case ENODATA:
|
||||||
|
return "No data available";
|
||||||
|
#endif
|
||||||
|
#if defined (ETIME)
|
||||||
|
case ETIME:
|
||||||
|
return "Timer expired";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOSR)
|
||||||
|
case ENOSR:
|
||||||
|
return "Out of streams resources";
|
||||||
|
#endif
|
||||||
|
#if defined (ENONET)
|
||||||
|
case ENONET:
|
||||||
|
return "Machine is not on the network";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOPKG)
|
||||||
|
case ENOPKG:
|
||||||
|
return "Package not installed";
|
||||||
|
#endif
|
||||||
|
#if defined (EREMOTE)
|
||||||
|
case EREMOTE:
|
||||||
|
return "Object is remote";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOLINK)
|
||||||
|
case ENOLINK:
|
||||||
|
return "Link has been severed";
|
||||||
|
#endif
|
||||||
|
#if defined (EADV)
|
||||||
|
case EADV:
|
||||||
|
return "Advertise error";
|
||||||
|
#endif
|
||||||
|
#if defined (ESRMNT)
|
||||||
|
case ESRMNT:
|
||||||
|
return "Srmount error";
|
||||||
|
#endif
|
||||||
|
#if defined (ECOMM)
|
||||||
|
case ECOMM:
|
||||||
|
return "Communication error on send";
|
||||||
|
#endif
|
||||||
|
#if defined (EPROTO)
|
||||||
|
case EPROTO:
|
||||||
|
return "Protocol error";
|
||||||
|
#endif
|
||||||
|
#if defined (EMULTIHOP)
|
||||||
|
case EMULTIHOP:
|
||||||
|
return "Multihop attempted";
|
||||||
|
#endif
|
||||||
|
#if defined (EDOTDOT)
|
||||||
|
case EDOTDOT:
|
||||||
|
return "RFS specific error";
|
||||||
|
#endif
|
||||||
|
#if defined (EBADMSG)
|
||||||
|
case EBADMSG:
|
||||||
|
return "Not a data message";
|
||||||
|
#endif
|
||||||
|
#if defined (ENAMETOOLONG)
|
||||||
|
case ENAMETOOLONG:
|
||||||
|
return "File name too long";
|
||||||
|
#endif
|
||||||
|
#if defined (EOVERFLOW)
|
||||||
|
case EOVERFLOW:
|
||||||
|
return "Value too large for defined data type";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOTUNIQ)
|
||||||
|
case ENOTUNIQ:
|
||||||
|
return "Name not unique on network";
|
||||||
|
#endif
|
||||||
|
#if defined (EBADFD)
|
||||||
|
case EBADFD:
|
||||||
|
return "File descriptor in bad state";
|
||||||
|
#endif
|
||||||
|
#if defined (EREMCHG)
|
||||||
|
case EREMCHG:
|
||||||
|
return "Remote address changed";
|
||||||
|
#endif
|
||||||
|
#if defined (ELIBACC)
|
||||||
|
case ELIBACC:
|
||||||
|
return "Can not access a needed shared library";
|
||||||
|
#endif
|
||||||
|
#if defined (ELIBBAD)
|
||||||
|
case ELIBBAD:
|
||||||
|
return "Accessing a corrupted shared library";
|
||||||
|
#endif
|
||||||
|
#if defined (ELIBSCN)
|
||||||
|
case ELIBSCN:
|
||||||
|
return ".lib section in a.out corrupted";
|
||||||
|
#endif
|
||||||
|
#if defined (ELIBMAX)
|
||||||
|
case ELIBMAX:
|
||||||
|
return "Attempting to link in too many shared libraries";
|
||||||
|
#endif
|
||||||
|
#if defined (ELIBEXEC)
|
||||||
|
case ELIBEXEC:
|
||||||
|
return "Cannot exec a shared library directly";
|
||||||
|
#endif
|
||||||
|
#if defined (EILSEQ)
|
||||||
|
case EILSEQ:
|
||||||
|
return "Illegal byte sequence";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOSYS)
|
||||||
|
case ENOSYS:
|
||||||
|
return "Operation not applicable";
|
||||||
|
#endif
|
||||||
|
#if defined (ELOOP)
|
||||||
|
case ELOOP:
|
||||||
|
return "Too many symbolic links encountered";
|
||||||
|
#endif
|
||||||
|
#if defined (ERESTART)
|
||||||
|
case ERESTART:
|
||||||
|
return "Interrupted system call should be restarted";
|
||||||
|
#endif
|
||||||
|
#if defined (ESTRPIPE)
|
||||||
|
case ESTRPIPE:
|
||||||
|
return "Streams pipe error";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOTEMPTY)
|
||||||
|
case ENOTEMPTY:
|
||||||
|
return "Directory not empty";
|
||||||
|
#endif
|
||||||
|
#if defined (EUSERS)
|
||||||
|
case EUSERS:
|
||||||
|
return "Too many users";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOTSOCK)
|
||||||
|
case ENOTSOCK:
|
||||||
|
return "Socket operation on non-socket";
|
||||||
|
#endif
|
||||||
|
#if defined (EDESTADDRREQ)
|
||||||
|
case EDESTADDRREQ:
|
||||||
|
return "Destination address required";
|
||||||
|
#endif
|
||||||
|
#if defined (EMSGSIZE)
|
||||||
|
case EMSGSIZE:
|
||||||
|
return "Message too long";
|
||||||
|
#endif
|
||||||
|
#if defined (EPROTOTYPE)
|
||||||
|
case EPROTOTYPE:
|
||||||
|
return "Protocol wrong type for socket";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOPROTOOPT)
|
||||||
|
case ENOPROTOOPT:
|
||||||
|
return "Protocol not available";
|
||||||
|
#endif
|
||||||
|
#if defined (EPROTONOSUPPORT)
|
||||||
|
case EPROTONOSUPPORT:
|
||||||
|
return "Protocol not supported";
|
||||||
|
#endif
|
||||||
|
#if defined (ESOCKTNOSUPPORT)
|
||||||
|
case ESOCKTNOSUPPORT:
|
||||||
|
return "Socket type not supported";
|
||||||
|
#endif
|
||||||
|
#if defined (EOPNOTSUPP)
|
||||||
|
case EOPNOTSUPP:
|
||||||
|
return "Operation not supported on transport endpoint";
|
||||||
|
#endif
|
||||||
|
#if defined (EPFNOSUPPORT)
|
||||||
|
case EPFNOSUPPORT:
|
||||||
|
return "Protocol family not supported";
|
||||||
|
#endif
|
||||||
|
#if defined (EAFNOSUPPORT)
|
||||||
|
case EAFNOSUPPORT:
|
||||||
|
return "Address family not supported by protocol";
|
||||||
|
#endif
|
||||||
|
#if defined (EADDRINUSE)
|
||||||
|
case EADDRINUSE:
|
||||||
|
return "Address already in use";
|
||||||
|
#endif
|
||||||
|
#if defined (EADDRNOTAVAIL)
|
||||||
|
case EADDRNOTAVAIL:
|
||||||
|
return "Cannot assign requested address";
|
||||||
|
#endif
|
||||||
|
#if defined (ENETDOWN)
|
||||||
|
case ENETDOWN:
|
||||||
|
return "Network is down";
|
||||||
|
#endif
|
||||||
|
#if defined (ENETUNREACH)
|
||||||
|
case ENETUNREACH:
|
||||||
|
return "Network is unreachable";
|
||||||
|
#endif
|
||||||
|
#if defined (ENETRESET)
|
||||||
|
case ENETRESET:
|
||||||
|
return "Network dropped connection because of reset";
|
||||||
|
#endif
|
||||||
|
#if defined (ECONNABORTED)
|
||||||
|
case ECONNABORTED:
|
||||||
|
return "Software caused connection abort";
|
||||||
|
#endif
|
||||||
|
#if defined (ECONNRESET)
|
||||||
|
case ECONNRESET:
|
||||||
|
return "Connection reset by peer";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOBUFS)
|
||||||
|
case ENOBUFS:
|
||||||
|
return "No buffer space available";
|
||||||
|
#endif
|
||||||
|
#if defined (EISCONN)
|
||||||
|
case EISCONN:
|
||||||
|
return "Transport endpoint is already connected";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOTCONN)
|
||||||
|
case ENOTCONN:
|
||||||
|
return "Transport endpoint is not connected";
|
||||||
|
#endif
|
||||||
|
#if defined (ESHUTDOWN)
|
||||||
|
case ESHUTDOWN:
|
||||||
|
return "Cannot send after transport endpoint shutdown";
|
||||||
|
#endif
|
||||||
|
#if defined (ETOOMANYREFS)
|
||||||
|
case ETOOMANYREFS:
|
||||||
|
return "Too many references: cannot splice";
|
||||||
|
#endif
|
||||||
|
#if defined (ETIMEDOUT)
|
||||||
|
case ETIMEDOUT:
|
||||||
|
return "Connection timed out";
|
||||||
|
#endif
|
||||||
|
#if defined (ECONNREFUSED)
|
||||||
|
case ECONNREFUSED:
|
||||||
|
return "Connection refused";
|
||||||
|
#endif
|
||||||
|
#if defined (EHOSTDOWN)
|
||||||
|
case EHOSTDOWN:
|
||||||
|
return "Host is down";
|
||||||
|
#endif
|
||||||
|
#if defined (EHOSTUNREACH)
|
||||||
|
case EHOSTUNREACH:
|
||||||
|
return "No route to host";
|
||||||
|
#endif
|
||||||
|
#if defined (EALREADY)
|
||||||
|
case EALREADY:
|
||||||
|
return "Operation already in progress";
|
||||||
|
#endif
|
||||||
|
#if defined (EINPROGRESS)
|
||||||
|
case EINPROGRESS:
|
||||||
|
return "Operation now in progress";
|
||||||
|
#endif
|
||||||
|
#if defined (ESTALE)
|
||||||
|
case ESTALE:
|
||||||
|
return "Stale NFS file handle";
|
||||||
|
#endif
|
||||||
|
#if defined (EUCLEAN)
|
||||||
|
case EUCLEAN:
|
||||||
|
return "Structure needs cleaning";
|
||||||
|
#endif
|
||||||
|
#if defined (ENOTNAM)
|
||||||
|
case ENOTNAM:
|
||||||
|
return "Not a XENIX named type file";
|
||||||
|
#endif
|
||||||
|
#if defined (ENAVAIL)
|
||||||
|
case ENAVAIL:
|
||||||
|
return "No XENIX semaphores available";
|
||||||
|
#endif
|
||||||
|
#if defined (EISNAM)
|
||||||
|
case EISNAM:
|
||||||
|
return "Is a named type file";
|
||||||
|
#endif
|
||||||
|
#if defined (EREMOTEIO)
|
||||||
|
case EREMOTEIO:
|
||||||
|
return "Remote I/O error";
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fallback: just print the error number */
|
||||||
|
snprintf(buf, sizeof(buf), "Error %d", errnum);
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* HAVE_STRERROR */
|
|
@ -1,4 +1,4 @@
|
||||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
@ -41,12 +41,13 @@ subdir = conf
|
||||||
DIST_COMMON = $(am__dist_sysconf_DATA_DIST) $(srcdir)/Makefile.am \
|
DIST_COMMON = $(am__dist_sysconf_DATA_DIST) $(srcdir)/Makefile.am \
|
||||||
$(srcdir)/Makefile.in $(srcdir)/upssched.conf.sample.in
|
$(srcdir)/Makefile.in $(srcdir)/upssched.conf.sample.in
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_ipv6.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
|
@ -56,6 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
|
$(top_srcdir)/m4/nut_config_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.in
|
$(top_srcdir)/configure.in
|
||||||
|
@ -95,9 +97,11 @@ am__base_list = \
|
||||||
am__installdirs = "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(sysconfdir)"
|
am__installdirs = "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(sysconfdir)"
|
||||||
DATA = $(dist_sysconf_DATA) $(nodist_sysconf_DATA)
|
DATA = $(dist_sysconf_DATA) $(nodist_sysconf_DATA)
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
A2X = @A2X@
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
|
ASCIIDOC = @ASCIIDOC@
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -110,8 +114,10 @@ CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DBLATEX = @DBLATEX@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -128,7 +134,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@
|
||||||
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
||||||
HAL_FDI_PATH = @HAL_FDI_PATH@
|
HAL_FDI_PATH = @HAL_FDI_PATH@
|
||||||
HAL_USER = @HAL_USER@
|
HAL_USER = @HAL_USER@
|
||||||
HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
@ -139,22 +144,22 @@ LDFLAGS = @LDFLAGS@
|
||||||
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
||||||
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
||||||
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
||||||
LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@
|
LIBHAL_LIBS = @LIBHAL_LIBS@
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@
|
LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
||||||
LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@
|
LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
|
|
@ -82,11 +82,11 @@
|
||||||
# Examples
|
# Examples
|
||||||
# --------
|
# --------
|
||||||
#
|
#
|
||||||
# A simple example for a UPS called "powerpal" that uses the megatec
|
# A simple example for a UPS called "powerpal" that uses the blazer_ser
|
||||||
# driver on /dev/ttyS0 is:
|
# driver on /dev/ttyS0 is:
|
||||||
#
|
#
|
||||||
# [powerpal]
|
# [powerpal]
|
||||||
# driver = megatec
|
# driver = blazer_ser
|
||||||
# port = /dev/ttyS0
|
# port = /dev/ttyS0
|
||||||
# desc = "Web server"
|
# desc = "Web server"
|
||||||
#
|
#
|
||||||
|
|
|
@ -17,6 +17,13 @@
|
||||||
# the data fresh within the normal 15 second interval. Watch the syslog
|
# the data fresh within the normal 15 second interval. Watch the syslog
|
||||||
# for notifications from upsd about staleness.
|
# for notifications from upsd about staleness.
|
||||||
|
|
||||||
|
# =======================================================================
|
||||||
|
# STATEPATH <path>
|
||||||
|
# STATEPATH /var/run/nut
|
||||||
|
#
|
||||||
|
# Tell upsd to look for the driver state sockets in 'path' rather
|
||||||
|
# than the default that was compiled into the program.
|
||||||
|
|
||||||
# =======================================================================
|
# =======================================================================
|
||||||
# LISTEN <address> [<port>]
|
# LISTEN <address> [<port>]
|
||||||
# LISTEN 127.0.0.1 3493
|
# LISTEN 127.0.0.1 3493
|
||||||
|
@ -34,8 +41,19 @@
|
||||||
|
|
||||||
# =======================================================================
|
# =======================================================================
|
||||||
# MAXCONN <connections>
|
# MAXCONN <connections>
|
||||||
|
# MAXCONN 1024
|
||||||
#
|
#
|
||||||
# This defaults to maximum number allowed on your system. Each UPS, each
|
# This defaults to maximum number allowed on your system. Each UPS, each
|
||||||
# LISTEN address and each client count as one connection. If the server
|
# LISTEN address and each client count as one connection. If the server
|
||||||
# runs out of connections, it will no longer accept new incoming client
|
# runs out of connections, it will no longer accept new incoming client
|
||||||
# connections. Only set this if you know exactly what you're doing.
|
# connections. Only set this if you know exactly what you're doing.
|
||||||
|
|
||||||
|
# =======================================================================
|
||||||
|
# CERTFILE <certificate file>
|
||||||
|
#
|
||||||
|
# When compiled with SSL support, you can enter the certificate file here.
|
||||||
|
# The certificates must be in PEM format and must be sorted starting with
|
||||||
|
# the subject's certificate (server certificate), followed by intermediate
|
||||||
|
# CA certificates (if applicable_ and the highest level (root) CA. It should
|
||||||
|
# end with the server key. See 'docs/security.txt' or the Security chapter of
|
||||||
|
# NUT user manual for more information on the SSL support in NUT.
|
||||||
|
|
|
@ -48,6 +48,14 @@
|
||||||
# instcmds = ALL
|
# instcmds = ALL
|
||||||
#
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# --- Configuring for a user who can execute tests only
|
||||||
|
#
|
||||||
|
# [testuser]
|
||||||
|
# password = pass
|
||||||
|
# instcmds = test.battery.start
|
||||||
|
# instcmds = test.battery.stop
|
||||||
|
|
||||||
#
|
#
|
||||||
# --- Configuring for upsmon
|
# --- Configuring for upsmon
|
||||||
#
|
#
|
||||||
|
|
58
config.guess
vendored
|
@ -1,10 +1,10 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2009-04-27'
|
timestamp='2009-06-10'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
|
@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||||
eval $set_cc_for_build
|
eval $set_cc_for_build
|
||||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||||
| grep __ELF__ >/dev/null
|
| grep -q __ELF__
|
||||||
then
|
then
|
||||||
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
|
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
|
||||||
# Return netbsd for either. FIX?
|
# Return netbsd for either. FIX?
|
||||||
|
@ -656,7 +656,7 @@ EOF
|
||||||
# => hppa64-hp-hpux11.23
|
# => hppa64-hp-hpux11.23
|
||||||
|
|
||||||
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
|
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
|
||||||
grep __LP64__ >/dev/null
|
grep -q __LP64__
|
||||||
then
|
then
|
||||||
HP_ARCH="hppa2.0w"
|
HP_ARCH="hppa2.0w"
|
||||||
else
|
else
|
||||||
|
@ -822,6 +822,9 @@ EOF
|
||||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||||
echo i${UNAME_MACHINE}-pc-mks
|
echo i${UNAME_MACHINE}-pc-mks
|
||||||
exit ;;
|
exit ;;
|
||||||
|
8664:Windows_NT:*)
|
||||||
|
echo x86_64-pc-mks
|
||||||
|
exit ;;
|
||||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||||
|
@ -882,40 +885,17 @@ EOF
|
||||||
m68*:Linux:*:*)
|
m68*:Linux:*:*)
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||||
exit ;;
|
exit ;;
|
||||||
mips:Linux:*:*)
|
mips:Linux:*:* | mips64:Linux:*:*)
|
||||||
eval $set_cc_for_build
|
eval $set_cc_for_build
|
||||||
sed 's/^ //' << EOF >$dummy.c
|
sed 's/^ //' << EOF >$dummy.c
|
||||||
#undef CPU
|
#undef CPU
|
||||||
#undef mips
|
#undef ${UNAME_MACHINE}
|
||||||
#undef mipsel
|
#undef ${UNAME_MACHINE}el
|
||||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||||
CPU=mipsel
|
CPU=${UNAME_MACHINE}el
|
||||||
#else
|
#else
|
||||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||||
CPU=mips
|
CPU=${UNAME_MACHINE}
|
||||||
#else
|
|
||||||
CPU=
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
EOF
|
|
||||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
|
||||||
/^CPU/{
|
|
||||||
s: ::g
|
|
||||||
p
|
|
||||||
}'`"
|
|
||||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
|
||||||
;;
|
|
||||||
mips64:Linux:*:*)
|
|
||||||
eval $set_cc_for_build
|
|
||||||
sed 's/^ //' << EOF >$dummy.c
|
|
||||||
#undef CPU
|
|
||||||
#undef mips64
|
|
||||||
#undef mips64el
|
|
||||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
|
||||||
CPU=mips64el
|
|
||||||
#else
|
|
||||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
|
||||||
CPU=mips64
|
|
||||||
#else
|
#else
|
||||||
CPU=
|
CPU=
|
||||||
#endif
|
#endif
|
||||||
|
@ -947,7 +927,7 @@ EOF
|
||||||
EV67) UNAME_MACHINE=alphaev67 ;;
|
EV67) UNAME_MACHINE=alphaev67 ;;
|
||||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||||
esac
|
esac
|
||||||
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
|
objdump --private-headers /bin/sh | grep -q ld.so.1
|
||||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
||||||
exit ;;
|
exit ;;
|
||||||
|
@ -1001,14 +981,6 @@ EOF
|
||||||
elf32-i386)
|
elf32-i386)
|
||||||
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
|
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
|
||||||
;;
|
;;
|
||||||
a.out-i386-linux)
|
|
||||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
|
||||||
exit ;;
|
|
||||||
"")
|
|
||||||
# Either a pre-BFD a.out linker (linux-gnuoldld) or
|
|
||||||
# one that does not give us useful --help.
|
|
||||||
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
|
|
||||||
exit ;;
|
|
||||||
esac
|
esac
|
||||||
# Determine whether the default compiler is a.out or elf
|
# Determine whether the default compiler is a.out or elf
|
||||||
eval $set_cc_for_build
|
eval $set_cc_for_build
|
||||||
|
@ -1074,7 +1046,7 @@ EOF
|
||||||
i*86:syllable:*:*)
|
i*86:syllable:*:*)
|
||||||
echo ${UNAME_MACHINE}-pc-syllable
|
echo ${UNAME_MACHINE}-pc-syllable
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
|
||||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
i*86:*DOS:*:*)
|
i*86:*DOS:*:*)
|
||||||
|
@ -1182,7 +1154,7 @@ EOF
|
||||||
rs6000:LynxOS:2.*:*)
|
rs6000:LynxOS:2.*:*)
|
||||||
echo rs6000-unknown-lynxos${UNAME_RELEASE}
|
echo rs6000-unknown-lynxos${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
|
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
|
||||||
echo powerpc-unknown-lynxos${UNAME_RELEASE}
|
echo powerpc-unknown-lynxos${UNAME_RELEASE}
|
||||||
exit ;;
|
exit ;;
|
||||||
SM[BE]S:UNIX_SV:*:*)
|
SM[BE]S:UNIX_SV:*:*)
|
||||||
|
|
15
config.sub
vendored
|
@ -1,10 +1,10 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||||
# Free Software Foundation, Inc.
|
# Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2009-04-17'
|
timestamp='2009-06-11'
|
||||||
|
|
||||||
# This file is (in principle) common to ALL GNU software.
|
# This file is (in principle) common to ALL GNU software.
|
||||||
# The presence of a machine in this file suggests that SOME GNU software
|
# The presence of a machine in this file suggests that SOME GNU software
|
||||||
|
@ -153,6 +153,9 @@ case $os in
|
||||||
os=
|
os=
|
||||||
basic_machine=$1
|
basic_machine=$1
|
||||||
;;
|
;;
|
||||||
|
-bluegene*)
|
||||||
|
os=-cnk
|
||||||
|
;;
|
||||||
-sim | -cisco | -oki | -wec | -winbond)
|
-sim | -cisco | -oki | -wec | -winbond)
|
||||||
os=
|
os=
|
||||||
basic_machine=$1
|
basic_machine=$1
|
||||||
|
@ -467,6 +470,10 @@ case $basic_machine in
|
||||||
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||||
os=-linux
|
os=-linux
|
||||||
;;
|
;;
|
||||||
|
bluegene*)
|
||||||
|
basic_machine=powerpc-ibm
|
||||||
|
os=-cnk
|
||||||
|
;;
|
||||||
c90)
|
c90)
|
||||||
basic_machine=c90-cray
|
basic_machine=c90-cray
|
||||||
os=-unicos
|
os=-unicos
|
||||||
|
@ -1260,7 +1267,7 @@ case $os in
|
||||||
# Each alternative MUST END IN A *, to match a version number.
|
# Each alternative MUST END IN A *, to match a version number.
|
||||||
# -sysv* is not here because it comes later, after sysvr4.
|
# -sysv* is not here because it comes later, after sysvr4.
|
||||||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
|
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
|
||||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||||
| -kopensolaris* \
|
| -kopensolaris* \
|
||||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||||
|
@ -1613,7 +1620,7 @@ case $basic_machine in
|
||||||
-sunos*)
|
-sunos*)
|
||||||
vendor=sun
|
vendor=sun
|
||||||
;;
|
;;
|
||||||
-aix*)
|
-cnk*|-aix*)
|
||||||
vendor=ibm
|
vendor=ibm
|
||||||
;;
|
;;
|
||||||
-beos*)
|
-beos*)
|
||||||
|
|
687
configure.in
|
@ -3,7 +3,7 @@ dnl | Network UPS Tools: configure.in |
|
||||||
dnl +------------------------------------------------------------------+
|
dnl +------------------------------------------------------------------+
|
||||||
|
|
||||||
dnl NUT version number is defined here and *only* here (no more include/version)
|
dnl NUT version number is defined here and *only* here (no more include/version)
|
||||||
AC_INIT(nut, 2.4.3)
|
AC_INIT(nut, 2.6.0)
|
||||||
AC_CONFIG_SRCDIR(server/upsd.c)
|
AC_CONFIG_SRCDIR(server/upsd.c)
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
echo "Network UPS Tools version ${PACKAGE_VERSION}"
|
echo "Network UPS Tools version ${PACKAGE_VERSION}"
|
||||||
|
@ -13,9 +13,14 @@ AC_CONFIG_HEADER(include/config.h)
|
||||||
AC_PREFIX_DEFAULT(/usr/local/ups)
|
AC_PREFIX_DEFAULT(/usr/local/ups)
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
|
|
||||||
dnl Require Autoconf 2.60 or better and enable features of Posix that are extensions to C
|
dnl we need Autoconf 2.60 or better to enable features of Posix that are extensions to C
|
||||||
AC_PREREQ([2.60])
|
AC_MSG_CHECKING(for autoconf macro to enable system extensions)
|
||||||
AC_USE_SYSTEM_EXTENSIONS
|
m4_version_prereq(2.60, [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_USE_SYSTEM_EXTENSIONS
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
])
|
||||||
|
|
||||||
dnl Use "./configure --enable-maintainer-mode" to keep Makefile.in and Makefile
|
dnl Use "./configure --enable-maintainer-mode" to keep Makefile.in and Makefile
|
||||||
dnl in sync after SVN updates.
|
dnl in sync after SVN updates.
|
||||||
|
@ -83,7 +88,8 @@ AC_C_VARARRAYS
|
||||||
AC_CHECK_FUNCS(flock lockf fcvt fcvtl)
|
AC_CHECK_FUNCS(flock lockf fcvt fcvtl)
|
||||||
AC_CHECK_FUNCS(cfsetispeed tcsendbreak)
|
AC_CHECK_FUNCS(cfsetispeed tcsendbreak)
|
||||||
AC_CHECK_FUNCS(seteuid setsid getpassphrase)
|
AC_CHECK_FUNCS(seteuid setsid getpassphrase)
|
||||||
AC_CHECK_FUNCS(on_exit strptime)
|
AC_CHECK_FUNCS(on_exit strptime setlogmask)
|
||||||
|
AC_CHECK_DECLS(LOG_UPTO, [], [], [#include <syslog.h>])
|
||||||
|
|
||||||
dnl the following may add stuff to LIBOBJS (is this still needed?)
|
dnl the following may add stuff to LIBOBJS (is this still needed?)
|
||||||
AC_CHECK_FUNCS(vsnprintf snprintf, [], [
|
AC_CHECK_FUNCS(vsnprintf snprintf, [], [
|
||||||
|
@ -92,7 +98,7 @@ AC_CHECK_FUNCS(vsnprintf snprintf, [], [
|
||||||
AC_TYPE_LONG_LONG_INT
|
AC_TYPE_LONG_LONG_INT
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_REPLACE_FUNCS(setenv inet_aton strerror atexit)
|
AC_REPLACE_FUNCS(setenv strerror atexit)
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Only use these when compiling with gcc
|
dnl Only use these when compiling with gcc
|
||||||
|
@ -149,24 +155,26 @@ dnl ----------------------------------------------------------------------
|
||||||
dnl check for --with-all (or --without-all, or --with-all=auto) flag
|
dnl check for --with-all (or --without-all, or --with-all=auto) flag
|
||||||
|
|
||||||
AC_MSG_CHECKING(for --with-all)
|
AC_MSG_CHECKING(for --with-all)
|
||||||
AC_ARG_WITH(all,
|
AC_ARG_WITH(all,
|
||||||
AC_HELP_STRING([--with-all], [enable serial, usb, snmp, hal, cgi, dev, neon, powerman]),
|
AS_HELP_STRING([--with-all], [enable serial, usb, snmp, hal, cgi, dev, neon, powerman]),
|
||||||
[ if test -n "${withval}"; then
|
[
|
||||||
|
if test -n "${withval}"; then
|
||||||
dnl Note: we allow "no" as a positive value, because
|
dnl Note: we allow "no" as a positive value, because
|
||||||
dnl this is what the user expects from --without-all
|
dnl this is what the user expects from --without-all
|
||||||
if test -z "${with_cgi}"; then with_cgi="${withval}"; fi
|
|
||||||
if test -z "${with_dev}"; then with_dev="${withval}"; fi
|
|
||||||
if test -z "${with_serial}"; then with_serial="${withval}"; fi
|
if test -z "${with_serial}"; then with_serial="${withval}"; fi
|
||||||
if test -z "${with_snmp}"; then with_snmp="${withval}"; fi
|
|
||||||
if test -z "${with_usb}"; then with_usb="${withval}"; fi
|
if test -z "${with_usb}"; then with_usb="${withval}"; fi
|
||||||
|
if test -z "${with_snmp}"; then with_snmp="${withval}"; fi
|
||||||
if test -z "${with_hal}"; then with_hal="${withval}"; fi
|
if test -z "${with_hal}"; then with_hal="${withval}"; fi
|
||||||
if test -z "${with_neon}"; then with_neon="${withval}"; fi
|
if test -z "${with_neon}"; then with_neon="${withval}"; fi
|
||||||
if test -z "${with_powerman}"; then with_powerman="${withval}"; fi
|
if test -z "${with_powerman}"; then with_powerman="${withval}"; fi
|
||||||
|
if test -z "${with_cgi}"; then with_cgi="${withval}"; fi
|
||||||
|
if test -z "${with_dev}"; then with_dev="${withval}"; fi
|
||||||
AC_MSG_RESULT("${withval}")
|
AC_MSG_RESULT("${withval}")
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(not given)
|
AC_MSG_RESULT(not given)
|
||||||
fi
|
fi
|
||||||
], [ AC_MSG_RESULT(not given)
|
], [
|
||||||
|
AC_MSG_RESULT(not given)
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------------
|
dnl ----------------------------------------------------------------------
|
||||||
|
@ -176,9 +184,20 @@ dnl they are listed near the top by "./configure --help"
|
||||||
NUT_ARG_WITH([dev], [build and install the development files], [no])
|
NUT_ARG_WITH([dev], [build and install the development files], [no])
|
||||||
NUT_ARG_WITH([serial], [build and install serial drivers], [yes])
|
NUT_ARG_WITH([serial], [build and install serial drivers], [yes])
|
||||||
NUT_ARG_WITH([usb], [build and install USB drivers], [auto])
|
NUT_ARG_WITH([usb], [build and install USB drivers], [auto])
|
||||||
|
NUT_ARG_WITH([doc], [build and install documentation], [no])
|
||||||
|
|
||||||
|
dnl ----------------------------------------------------------------------
|
||||||
|
dnl Check for presence and compiler flags of various libraries
|
||||||
|
|
||||||
|
dnl These checks are performed unconditionally, even if the corresponding
|
||||||
|
dnl --with-* options are not given. This is because we cannot predict
|
||||||
|
dnl what will be in the --with-drivers argument.
|
||||||
|
|
||||||
|
NUT_CHECK_LIBNETSNMP
|
||||||
NUT_CHECK_LIBUSB
|
NUT_CHECK_LIBUSB
|
||||||
NUT_ARG_WITH([hal], [build and install HAL support], [no])
|
NUT_ARG_WITH([hal], [build and install HAL support], [no])
|
||||||
NUT_CHECK_LIBHAL
|
NUT_CHECK_LIBHAL
|
||||||
|
NUT_CONFIG_LIBHAL
|
||||||
NUT_ARG_WITH([snmp], [build and install SNMP drivers], [auto])
|
NUT_ARG_WITH([snmp], [build and install SNMP drivers], [auto])
|
||||||
NUT_CHECK_LIBNETSNMP
|
NUT_CHECK_LIBNETSNMP
|
||||||
NUT_ARG_WITH([neon], [build and install neon based XML/HTTP driver], [auto])
|
NUT_ARG_WITH([neon], [build and install neon based XML/HTTP driver], [auto])
|
||||||
|
@ -194,7 +213,7 @@ case ${target_os} in
|
||||||
solaris2.1* )
|
solaris2.1* )
|
||||||
echo Checking for Solaris 10 / 11 specific configuration for usb drivers
|
echo Checking for Solaris 10 / 11 specific configuration for usb drivers
|
||||||
AC_SEARCH_LIBS(nanosleep, rt)
|
AC_SEARCH_LIBS(nanosleep, rt)
|
||||||
LIBUSB_LDFLAGS="-R/usr/sfw/lib ${LIBUSB_LDFLAGS}"
|
LIBUSB_LIBS="-R/usr/sfw/lib ${LIBUSB_LIBS}"
|
||||||
dnl FIXME: Sun's libusb doesn't support timeout (so blocks notification)
|
dnl FIXME: Sun's libusb doesn't support timeout (so blocks notification)
|
||||||
dnl and need to call libusb close upon reconnexion
|
dnl and need to call libusb close upon reconnexion
|
||||||
AC_DEFINE(SUN_LIBUSB, 1, [Define to 1 for Sun version of the libusb.])
|
AC_DEFINE(SUN_LIBUSB, 1, [Define to 1 for Sun version of the libusb.])
|
||||||
|
@ -202,6 +221,78 @@ case ${target_os} in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
dnl ----------------------------------------------------------------------
|
||||||
|
dnl checks related to --with-serial
|
||||||
|
|
||||||
|
dnl ${nut_with_serial}: any value except "yes" or "no" is treated as "auto".
|
||||||
|
if test "${nut_with_serial}" != "no"; then
|
||||||
|
nut_with_serial="yes"
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(WITH_SERIAL, test "${nut_with_serial}" = "yes")
|
||||||
|
NUT_REPORT_FEATURE([build serial drivers], [${nut_with_serial}])
|
||||||
|
|
||||||
|
dnl ----------------------------------------------------------------------
|
||||||
|
dnl checks related to --with-usb
|
||||||
|
|
||||||
|
dnl ${nut_with_usb}: any value except "yes" or "no" is treated as "auto".
|
||||||
|
if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then
|
||||||
|
AC_MSG_ERROR(["USB drivers requested, but libusb not found."])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "${nut_with_usb}" != "no"; then
|
||||||
|
nut_with_usb="${nut_have_libusb}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(WITH_USB, test "${nut_with_usb}" = "yes")
|
||||||
|
NUT_REPORT_FEATURE([build USB drivers], [${nut_with_usb}])
|
||||||
|
|
||||||
|
dnl ----------------------------------------------------------------------
|
||||||
|
dnl checks related to --with-snmp
|
||||||
|
|
||||||
|
dnl ${nut_with_snmp}: any value except "yes" or "no" is treated as "auto".
|
||||||
|
if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then
|
||||||
|
AC_MSG_ERROR(["Net-SNMP libraries not found, required for SNMP drivers"])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "${nut_with_snmp}" != "no"; then
|
||||||
|
nut_with_snmp="${nut_have_libnetsnmp}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(WITH_SNMP, test "${nut_with_snmp}" = "yes")
|
||||||
|
NUT_REPORT_FEATURE([build SNMP drivers], [${nut_with_snmp}])
|
||||||
|
|
||||||
|
dnl ----------------------------------------------------------------------
|
||||||
|
dnl checks related to --with-neon
|
||||||
|
|
||||||
|
dnl ${nut_with_neon}: any value except "yes" or "no" is treated as "auto".
|
||||||
|
if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then
|
||||||
|
AC_MSG_ERROR(["neon libraries not found, required for neon based XML/HTTP driver"])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "${nut_with_neon}" != "no"; then
|
||||||
|
nut_with_neon="${nut_have_neon}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(WITH_NEONXML, test "${nut_with_neon}" = "yes")
|
||||||
|
NUT_REPORT_FEATURE([build neon based XML driver], [${nut_with_neon}])
|
||||||
|
|
||||||
|
dnl ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
dnl checks related to --with-powerman
|
||||||
|
|
||||||
|
dnl ${nut_with_powerman}: any value except "yes" or "no" is treated as "auto".
|
||||||
|
if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then
|
||||||
|
AC_MSG_ERROR(["Powerman client libraries not found, required for Powerman PDU client driver"])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "${nut_with_powerman}" != "no"; then
|
||||||
|
nut_with_powerman="${nut_have_libpowerman}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL(WITH_LIBPOWERMAN, test "${nut_with_powerman}" = "yes")
|
||||||
|
NUT_REPORT_FEATURE([build Powerman PDU client driver], [${nut_with_powerman}])
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------------
|
dnl ----------------------------------------------------------------------
|
||||||
dnl Check for --with-ssl
|
dnl Check for --with-ssl
|
||||||
|
|
||||||
|
@ -246,27 +337,6 @@ fi
|
||||||
AM_CONDITIONAL(WITH_WRAP, test "${nut_with_wrap}" = "yes")
|
AM_CONDITIONAL(WITH_WRAP, test "${nut_with_wrap}" = "yes")
|
||||||
NUT_REPORT_FEATURE([enable libwrap (tcp-wrappers) support], [${nut_with_wrap}])
|
NUT_REPORT_FEATURE([enable libwrap (tcp-wrappers) support], [${nut_with_wrap}])
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------------
|
|
||||||
dnl check whether to compile IPv6 features
|
|
||||||
|
|
||||||
NUT_ARG_WITH([ipv6], [enable IPv6 support], [auto])
|
|
||||||
|
|
||||||
dnl ${nut_with_ipv6}: any value except "yes" or "no" is treated as "auto".
|
|
||||||
if test "${nut_with_ipv6}" != "no"; then
|
|
||||||
dnl check for IPv6 prerequisites
|
|
||||||
NUT_CHECK_IPV6
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${nut_with_ipv6}" = "yes" -a "${nut_have_ipv6}" != "yes"; then
|
|
||||||
AC_MSG_ERROR(["Some feature required for IPv6 support is missing"])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${nut_with_ipv6}" != "no"; then
|
|
||||||
nut_with_ipv6="${nut_have_ipv6}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
NUT_REPORT_FEATURE([enable IPv6 support], [${nut_with_ipv6}])
|
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------------
|
dnl ----------------------------------------------------------------------
|
||||||
dnl checks related to --with-cgi
|
dnl checks related to --with-cgi
|
||||||
|
|
||||||
|
@ -289,61 +359,6 @@ fi
|
||||||
AM_CONDITIONAL(WITH_CGI, test "${nut_with_cgi}" = "yes")
|
AM_CONDITIONAL(WITH_CGI, test "${nut_with_cgi}" = "yes")
|
||||||
NUT_REPORT_FEATURE([build CGI programs], [${nut_with_cgi}])
|
NUT_REPORT_FEATURE([build CGI programs], [${nut_with_cgi}])
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------------
|
|
||||||
dnl checks related to --with-dev
|
|
||||||
|
|
||||||
dnl ${nut_with_dev}: any value except "yes" or "no" is treated as "auto".
|
|
||||||
if test "${nut_with_dev}" != "no"; then
|
|
||||||
nut_with_dev="yes"
|
|
||||||
else
|
|
||||||
AC_DISABLE_STATIC
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL(WITH_DEV, test "${nut_with_dev}" = "yes")
|
|
||||||
NUT_REPORT_FEATURE([build and install the development files], [${nut_with_dev}])
|
|
||||||
|
|
||||||
dnl We only init libtool there to allow AC_DISABLE_STATIC
|
|
||||||
AC_PROG_LIBTOOL
|
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------------
|
|
||||||
dnl checks related to --with-serial
|
|
||||||
|
|
||||||
dnl ${nut_with_serial}: any value except "yes" or "no" is treated as "auto".
|
|
||||||
if test "${nut_with_serial}" != "no"; then
|
|
||||||
nut_with_serial="yes"
|
|
||||||
fi
|
|
||||||
AM_CONDITIONAL(WITH_SERIAL, test "${nut_with_serial}" = "yes")
|
|
||||||
NUT_REPORT_FEATURE([build serial drivers], [${nut_with_serial}])
|
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------------
|
|
||||||
dnl checks related to --with-snmp
|
|
||||||
|
|
||||||
dnl ${nut_with_snmp}: any value except "yes" or "no" is treated as "auto".
|
|
||||||
if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then
|
|
||||||
AC_MSG_ERROR(["Net-SNMP libraries not found, required for SNMP drivers"])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${nut_with_snmp}" != "no"; then
|
|
||||||
nut_with_snmp="${nut_have_libnetsnmp}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AM_CONDITIONAL(WITH_SNMP, test "${nut_with_snmp}" = "yes")
|
|
||||||
NUT_REPORT_FEATURE([build SNMP drivers], [${nut_with_snmp}])
|
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------------
|
|
||||||
dnl checks related to --with-usb
|
|
||||||
|
|
||||||
dnl ${nut_with_usb}: any value except "yes" or "no" is treated as "auto".
|
|
||||||
if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then
|
|
||||||
AC_MSG_ERROR(["USB drivers requested, but libusb not found."])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${nut_with_usb}" != "no"; then
|
|
||||||
nut_with_usb="${nut_have_libusb}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AM_CONDITIONAL(WITH_USB, test "${nut_with_usb}" = "yes")
|
|
||||||
NUT_REPORT_FEATURE([build USB drivers], [${nut_with_usb}])
|
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------------
|
dnl ----------------------------------------------------------------------
|
||||||
dnl checks related to --with-hal
|
dnl checks related to --with-hal
|
||||||
|
|
||||||
|
@ -368,88 +383,178 @@ AM_CONDITIONAL(WITH_HAL, test "${nut_with_hal}" = "yes")
|
||||||
NUT_REPORT_FEATURE([enable HAL support], [${nut_with_hal}])
|
NUT_REPORT_FEATURE([enable HAL support], [${nut_with_hal}])
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------------
|
dnl ----------------------------------------------------------------------
|
||||||
dnl checks related to --with-neon
|
|
||||||
|
|
||||||
dnl ${nut_with_neon}: any value except "yes" or "no" is treated as "auto".
|
dnl checks related to --with-doc
|
||||||
if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then
|
|
||||||
AC_MSG_ERROR(["neon libraries not found, required for neon based XML/HTTP driver"])
|
dnl Always check for AsciiDoc prerequisites, since even if --with-doc
|
||||||
|
dnl is set to 'no', we may still want to build the website, or some
|
||||||
|
dnl doc targets manually
|
||||||
|
NUT_CHECK_ASCIIDOC
|
||||||
|
|
||||||
|
case "${nut_with_doc}" in
|
||||||
|
yes|all|auto)
|
||||||
|
nut_doc_build_list="html-single html-chunked pdf"
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
nut_doc_build_list=""
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
nut_doc_build_list="`echo ${nut_with_doc} | sed 's/,/ /g'`"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
for nut_doc_build_target in ${nut_doc_build_list}; do
|
||||||
|
case "${nut_doc_build_target}" in
|
||||||
|
html-single)
|
||||||
|
AC_MSG_CHECKING([if asciidoc version can build ${nut_doc_build_target}])
|
||||||
|
AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}"
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}"
|
||||||
|
])
|
||||||
|
;;
|
||||||
|
|
||||||
|
html-chunked)
|
||||||
|
AC_MSG_CHECKING([if a2x version can build ${nut_doc_build_target}])
|
||||||
|
AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}"
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}"
|
||||||
|
])
|
||||||
|
;;
|
||||||
|
|
||||||
|
pdf)
|
||||||
|
AC_MSG_CHECKING([if dblatex version can build ${nut_doc_build_target}])
|
||||||
|
AX_COMPARE_VERSION([${DBLATEX_VERSION}], [ge], [0.2.5], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}"
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}"
|
||||||
|
])
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
case "${nut_with_doc}" in
|
||||||
|
auto)
|
||||||
|
if test -n "${DOC_BUILD_LIST}"; then
|
||||||
|
nut_with_doc="yes"
|
||||||
|
else
|
||||||
|
nut_with_doc="no"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
no)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if test -z "${DOC_NOBUILD_LIST}"; then
|
||||||
|
nut_with_doc="yes"
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR(["Asciidoc is required for documentation support and missing"])
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if asciidoc version can build website (minimum required 8.6.3)])
|
||||||
|
AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
nut_have_asciidoc="yes"
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
nut_have_asciidoc="no"
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if a2x version can build website (minimum required 8.6.3)])
|
||||||
|
AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
], [
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
nut_have_asciidoc="no"
|
||||||
|
])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([HAVE_ASCIIDOC], [test "${nut_have_asciidoc}" = "yes"])
|
||||||
|
NUT_REPORT_FEATURE([build and install documentation], [${nut_with_doc}])
|
||||||
|
|
||||||
|
if test "${nut_with_doc}" = "yes"; then
|
||||||
|
NUT_REPORT([only build specific documentation format], [${DOC_BUILD_LIST}])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "${nut_with_neon}" != "no"; then
|
dnl ----------------------------------------------------------------------
|
||||||
nut_with_neon="${nut_have_neon}"
|
dnl checks related to --with-dev
|
||||||
fi
|
|
||||||
|
|
||||||
AM_CONDITIONAL(WITH_NEONXML, test "${nut_with_neon}" = "yes")
|
dnl We only init libtool there to allow AC_DISABLE_STATIC
|
||||||
NUT_REPORT_FEATURE([build neon based XML driver], [${nut_with_neon}])
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
|
dnl ${nut_with_dev}: any value except "yes" or "no" is treated as "auto".
|
||||||
|
if test "${nut_with_dev}" != "no"; then
|
||||||
|
nut_with_dev="yes"
|
||||||
|
else
|
||||||
|
AC_DISABLE_STATIC
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(WITH_DEV, test "${nut_with_dev}" = "yes")
|
||||||
|
NUT_REPORT_FEATURE([build and install the development files], [${nut_with_dev}])
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------------
|
dnl ----------------------------------------------------------------------
|
||||||
|
|
||||||
dnl checks related to --with-powerman
|
|
||||||
|
|
||||||
dnl ${nut_with_powerman}: any value except "yes" or "no" is treated as "auto".
|
|
||||||
if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then
|
|
||||||
AC_MSG_ERROR(["Powerman client libraries not found, required for Powerman PDU client driver"])
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "${nut_with_powerman}" != "no"; then
|
|
||||||
nut_with_powerman="${nut_have_libpowerman}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AM_CONDITIONAL(WITH_LIBPOWERMAN, test "${nut_with_powerman}" = "yes")
|
|
||||||
NUT_REPORT_FEATURE([build Powerman PDU client driver], [${nut_with_powerman}])
|
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------------
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(state path)
|
AC_MSG_CHECKING(state path)
|
||||||
AC_ARG_WITH(statepath,
|
AC_ARG_WITH(statepath,
|
||||||
AC_HELP_STRING([--with-statepath=PATH], [path for ups state files (/var/state/ups)]),
|
AS_HELP_STRING([--with-statepath=PATH], [path for ups state files (/var/state/ups)]),
|
||||||
[ case "${withval}" in
|
[
|
||||||
|
case "${withval}" in
|
||||||
yes|no)
|
yes|no)
|
||||||
|
AC_MSG_ERROR(invalid option --with(out)-statepath - see docs/configure.txt)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
STATEPATH="${withval}"
|
STATEPATH="${withval}"
|
||||||
;;
|
;;
|
||||||
esac],
|
esac
|
||||||
)
|
], [])
|
||||||
AC_DEFINE_UNQUOTED(STATEPATH, "${STATEPATH}",
|
AC_DEFINE_UNQUOTED(STATEPATH, "${STATEPATH}", [Path for UPS driver state files])
|
||||||
[Path for UPS driver state files])
|
|
||||||
AC_MSG_RESULT(${STATEPATH})
|
AC_MSG_RESULT(${STATEPATH})
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------
|
||||||
dnl The 'alt pid path' is used by the drivers (via main.c) and upsd, since
|
dnl The 'alt pid path' is used by the drivers (via main.c) and upsd, since
|
||||||
dnl ideally they do not run as root and won't be able to write to the usual
|
dnl ideally they do not run as root and will not be able to write to the usual
|
||||||
dnl /var/run path. This defaults to the STATEPATH since they should be
|
dnl /var/run path. This defaults to the STATEPATH since they should be
|
||||||
dnl able to write there.
|
dnl able to write there.
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
AC_MSG_CHECKING(alt pid path)
|
AC_MSG_CHECKING(alt pid path)
|
||||||
AC_ARG_WITH(altpidpath,
|
AC_ARG_WITH(altpidpath,
|
||||||
AC_HELP_STRING([--with-altpidpath=PATH], [path for driver/upsd .pid files (<statepath>)]),
|
AS_HELP_STRING([--with-altpidpath=PATH], [path for driver/upsd .pid files (<statepath>)]),
|
||||||
[ case "${withval}" in
|
[
|
||||||
|
case "${withval}" in
|
||||||
yes|no)
|
yes|no)
|
||||||
ALTPIDPATH="${STATEPATH}"
|
AC_MSG_ERROR(invalid option --with(out)-altpidpath - see docs/configure.txt)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
ALTPIDPATH="${withval}"
|
ALTPIDPATH="${withval}"
|
||||||
;;
|
;;
|
||||||
esac],
|
esac
|
||||||
|
], [
|
||||||
ALTPIDPATH="${STATEPATH}"
|
ALTPIDPATH="${STATEPATH}"
|
||||||
)
|
])
|
||||||
AC_DEFINE_UNQUOTED(ALTPIDPATH, "${ALTPIDPATH}",
|
AC_DEFINE_UNQUOTED(ALTPIDPATH, "${ALTPIDPATH}", [Path for pid files of drivers and upsd (usually STATEPATH)])
|
||||||
[Path for pid files of drivers and upsd (usually STATEPATH)])
|
|
||||||
AC_MSG_RESULT(${ALTPIDPATH})
|
AC_MSG_RESULT(${ALTPIDPATH})
|
||||||
|
|
||||||
AC_MSG_CHECKING(driver path)
|
AC_MSG_CHECKING(driver path)
|
||||||
AC_ARG_WITH(drvpath,
|
AC_ARG_WITH(drvpath,
|
||||||
AC_HELP_STRING([--with-drvpath=PATH], [where to install ups drivers (EPREFIX/bin)]),
|
AS_HELP_STRING([--with-drvpath=PATH], [where to install ups drivers (EPREFIX/bin)]),
|
||||||
[ case "${withval}" in
|
[
|
||||||
|
case "${withval}" in
|
||||||
yes|no)
|
yes|no)
|
||||||
|
AC_MSG_ERROR(invalid option --with(out)-drvpath - see docs/configure.txt)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
driverexecdir="${withval}"
|
driverexecdir="${withval}"
|
||||||
;;
|
;;
|
||||||
esac],
|
esac
|
||||||
)
|
], [])
|
||||||
conftemp="${driverexecdir}"
|
conftemp="${driverexecdir}"
|
||||||
eval conftemp=\"${conftemp}\"
|
eval conftemp=\"${conftemp}\"
|
||||||
eval conftemp=\"${conftemp}\"
|
eval conftemp=\"${conftemp}\"
|
||||||
|
@ -458,15 +563,17 @@ AC_MSG_RESULT(${driverexecdir})
|
||||||
|
|
||||||
AC_MSG_CHECKING(cgi path)
|
AC_MSG_CHECKING(cgi path)
|
||||||
AC_ARG_WITH(cgipath,
|
AC_ARG_WITH(cgipath,
|
||||||
AC_HELP_STRING([--with-cgipath=PATH], [where to install CGI programs (EPREFIX/cgi-bin)]),
|
AS_HELP_STRING([--with-cgipath=PATH], [where to install CGI programs (EPREFIX/cgi-bin)]),
|
||||||
[ case "${withval}" in
|
[
|
||||||
|
case "${withval}" in
|
||||||
yes|no)
|
yes|no)
|
||||||
|
AC_MSG_ERROR(invalid option --with(out)-cgipath - see docs/configure.txt)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
cgiexecdir="${withval}"
|
cgiexecdir="${withval}"
|
||||||
;;
|
;;
|
||||||
esac],
|
esac
|
||||||
)
|
], [])
|
||||||
conftemp="${cgiexecdir}"
|
conftemp="${cgiexecdir}"
|
||||||
eval conftemp=\"${conftemp}\"
|
eval conftemp=\"${conftemp}\"
|
||||||
eval conftemp=\"${conftemp}\"
|
eval conftemp=\"${conftemp}\"
|
||||||
|
@ -475,15 +582,17 @@ AC_MSG_RESULT(${cgiexecdir})
|
||||||
|
|
||||||
AC_MSG_CHECKING(html path)
|
AC_MSG_CHECKING(html path)
|
||||||
AC_ARG_WITH(htmlpath,
|
AC_ARG_WITH(htmlpath,
|
||||||
AC_HELP_STRING([--with-htmlpath=PATH], [where to install HTML files (PREFIX/html)]),
|
AS_HELP_STRING([--with-htmlpath=PATH], [where to install HTML files (PREFIX/html)]),
|
||||||
[ case "${withval}" in
|
[
|
||||||
|
case "${withval}" in
|
||||||
yes|no)
|
yes|no)
|
||||||
|
AC_MSG_ERROR(invalid option --with(out)-htmlpath - see docs/configure.txt)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
htmldir="${withval}"
|
htmldir="${withval}"
|
||||||
;;
|
;;
|
||||||
esac],
|
esac
|
||||||
)
|
], [])
|
||||||
conftemp="${htmldir}"
|
conftemp="${htmldir}"
|
||||||
eval conftemp=\"${conftemp}\"
|
eval conftemp=\"${conftemp}\"
|
||||||
eval conftemp=\"${conftemp}\"
|
eval conftemp=\"${conftemp}\"
|
||||||
|
@ -492,276 +601,283 @@ AC_MSG_RESULT(${htmldir})
|
||||||
|
|
||||||
AC_MSG_CHECKING(pidpath)
|
AC_MSG_CHECKING(pidpath)
|
||||||
AC_ARG_WITH(pidpath,
|
AC_ARG_WITH(pidpath,
|
||||||
AC_HELP_STRING([--with-pidpath=PATH], [path for .pid files (/var/run)]),
|
AS_HELP_STRING([--with-pidpath=PATH], [path for .pid files (/var/run)]),
|
||||||
[ case "${withval}" in
|
[
|
||||||
|
case "${withval}" in
|
||||||
yes|no)
|
yes|no)
|
||||||
|
AC_MSG_ERROR(invalid option --with(out)-pidpath - see docs/configure.txt)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
PIDPATH="${withval}"
|
PIDPATH="${withval}"
|
||||||
;;
|
;;
|
||||||
esac],
|
esac
|
||||||
)
|
], [])
|
||||||
AC_DEFINE_UNQUOTED(PIDPATH, "${PIDPATH}", [Path where the pid files should go])
|
AC_DEFINE_UNQUOTED(PIDPATH, "${PIDPATH}", [Path where the pid files should go])
|
||||||
AC_MSG_RESULT(${PIDPATH})
|
AC_MSG_RESULT(${PIDPATH})
|
||||||
|
|
||||||
AC_MSG_CHECKING(network port number)
|
AC_MSG_CHECKING(network port number)
|
||||||
AC_ARG_WITH(port,
|
AC_ARG_WITH(port,
|
||||||
AC_HELP_STRING([--with-port=PORT], [port for network communications (3493)]),
|
AS_HELP_STRING([--with-port=PORT], [port for network communications (3493)]),
|
||||||
[ case "${withval}" in
|
[
|
||||||
|
case "${withval}" in
|
||||||
yes|no)
|
yes|no)
|
||||||
PORT="3493"
|
AC_MSG_ERROR(invalid option --with(out)-port - see docs/configure.txt)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
PORT="${withval}"
|
PORT="${withval}"
|
||||||
;;
|
;;
|
||||||
esac],
|
esac
|
||||||
|
], [
|
||||||
PORT="3493"
|
PORT="3493"
|
||||||
)
|
])
|
||||||
AC_DEFINE_UNQUOTED(PORT, ${PORT}, [Port for network communications])
|
AC_DEFINE_UNQUOTED(PORT, ${PORT}, [Port for network communications])
|
||||||
AC_MSG_RESULT(${PORT})
|
AC_MSG_RESULT(${PORT})
|
||||||
|
|
||||||
nut_user_given=
|
|
||||||
AC_MSG_CHECKING(user to run as)
|
AC_MSG_CHECKING(user to run as)
|
||||||
AC_ARG_WITH(user,
|
AC_ARG_WITH(user,
|
||||||
AC_HELP_STRING([--with-user=username], [user for programs started as root (nobody)]),
|
AS_HELP_STRING([--with-user=username], [user for programs started as root (nobody)]),
|
||||||
[ case "${withval}" in
|
[
|
||||||
|
case "${withval}" in
|
||||||
yes|no)
|
yes|no)
|
||||||
|
AC_MSG_ERROR(invalid option --with(out)-user - see docs/configure.txt)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
RUN_AS_USER="${withval}"
|
RUN_AS_USER="${withval}"
|
||||||
nut_user_given=yes
|
nut_user_given=yes
|
||||||
;;
|
;;
|
||||||
esac],
|
esac
|
||||||
)
|
], [
|
||||||
AC_DEFINE_UNQUOTED(RUN_AS_USER, "${RUN_AS_USER}",
|
nut_user_given=no
|
||||||
[User to switch to if started as root])
|
])
|
||||||
|
AC_DEFINE_UNQUOTED(RUN_AS_USER, "${RUN_AS_USER}", [User to switch to if started as root])
|
||||||
AC_MSG_RESULT(${RUN_AS_USER})
|
AC_MSG_RESULT(${RUN_AS_USER})
|
||||||
|
|
||||||
nut_group_given=
|
|
||||||
AC_MSG_CHECKING(group membership of user to run as)
|
AC_MSG_CHECKING(group membership of user to run as)
|
||||||
AC_ARG_WITH(group,
|
AC_ARG_WITH(group,
|
||||||
AC_HELP_STRING([--with-group=groupname], [group membership of user for programs started as root (nogroup)]),
|
AS_HELP_STRING([--with-group=groupname], [group membership of user for programs started as root (nogroup)]),
|
||||||
[ case "${withval}" in
|
[
|
||||||
|
case "${withval}" in
|
||||||
yes|no)
|
yes|no)
|
||||||
|
AC_MSG_ERROR(invalid option --with(out)-group - see docs/configure.txt)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
RUN_AS_GROUP="${withval}"
|
RUN_AS_GROUP="${withval}"
|
||||||
nut_group_given=yes
|
nut_group_given=yes
|
||||||
;;
|
;;
|
||||||
esac],
|
esac
|
||||||
)
|
], [
|
||||||
AC_DEFINE_UNQUOTED(RUN_AS_GROUP, "${RUN_AS_GROUP}",
|
nut_group_given=no
|
||||||
[Group membership of user to switch to if started as root])
|
])
|
||||||
|
AC_DEFINE_UNQUOTED(RUN_AS_GROUP, "${RUN_AS_GROUP}", [Group membership of user to switch to if started as root])
|
||||||
AC_MSG_RESULT(${RUN_AS_GROUP})
|
AC_MSG_RESULT(${RUN_AS_GROUP})
|
||||||
|
|
||||||
dnl check that --with-user is given iff --with-group is given.
|
dnl check that --with-user is given if --with-group is given.
|
||||||
if test -n "$nut_user_given" -a -z "$nut_group_given"; then
|
if test "${nut_user_given}" = "yes" -a "${nut_group_given}" = "no"; then
|
||||||
AC_MSG_ERROR(["If you specify --with-user, you also must specify --with-group"])
|
AC_MSG_ERROR(["If you specify --with-user, you also must specify --with-group"])
|
||||||
elif test -z "$nut_user_given" -a -n "$nut_group_given"; then
|
elif test "${nut_user_given}" = "no" -a "${nut_group_given}" = "yes"; then
|
||||||
AC_MSG_ERROR(["If you specify --with-group, you also must specify --with-user"])
|
AC_MSG_ERROR(["If you specify --with-group, you also must specify --with-user"])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(facility for syslog)
|
AC_MSG_CHECKING(facility for syslog)
|
||||||
AC_ARG_WITH(logfacility,
|
AC_ARG_WITH(logfacility,
|
||||||
AC_HELP_STRING([--with-logfacility=FACILITY], [facility for log messages (LOG_DAEMON)]),
|
AS_HELP_STRING([--with-logfacility=FACILITY], [facility for log messages (LOG_DAEMON)]),
|
||||||
[ case "${withval}" in
|
[
|
||||||
|
case "${withval}" in
|
||||||
yes|no)
|
yes|no)
|
||||||
LOGFACILITY="LOG_DAEMON"
|
AC_MSG_ERROR(invalid option --with(out)-logfacility - see docs/configure.txt)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
LOGFACILITY="${withval}"
|
LOGFACILITY="${withval}"
|
||||||
;;
|
;;
|
||||||
esac],
|
esac
|
||||||
|
], [
|
||||||
LOGFACILITY="LOG_DAEMON"
|
LOGFACILITY="LOG_DAEMON"
|
||||||
)
|
])
|
||||||
AC_DEFINE_UNQUOTED(LOG_FACILITY, ${LOGFACILITY},
|
AC_DEFINE_UNQUOTED(LOG_FACILITY, ${LOGFACILITY}, [Desired syslog facility - see syslog(3)])
|
||||||
[Desired syslog facility - see syslog(3)])
|
|
||||||
AC_MSG_RESULT(${LOGFACILITY})
|
AC_MSG_RESULT(${LOGFACILITY})
|
||||||
|
|
||||||
|
dnl Autoconf versions before 2.62 do not allow consecutive quadrigraphs,
|
||||||
|
dnl so the help string depends on the version used
|
||||||
AC_MSG_CHECKING(which drivers to build)
|
AC_MSG_CHECKING(which drivers to build)
|
||||||
AC_ARG_WITH(drivers,
|
AC_ARG_WITH(drivers,
|
||||||
AC_HELP_STRING([[[[--with-drivers=driver@<:@,driver...@:>@]]]], [Only use specific drivers (all)]),
|
AS_HELP_STRING([m4_version_prereq(2.62,
|
||||||
[ case "${withval}" in
|
[@<:@--with-drivers=driver@<:@,driver@:>@@:>@],
|
||||||
yes | no)
|
[[[[--with-drivers=driver@<:@,driver@:>@]]]])],
|
||||||
dnl ignore calls without any arguments
|
[Only use specific drivers (all)]),
|
||||||
DRIVER_BUILD_LIST="all"
|
[
|
||||||
AC_MSG_RESULT(all available)
|
case "${withval}" in
|
||||||
|
yes|no)
|
||||||
|
AC_MSG_ERROR(invalid option --with(out)-drivers - see docs/configure.txt)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
DRIVER_BUILD_LIST=`echo ${withval} | sed "s/,/ /g"`
|
DRIVER_BUILD_LIST=`echo ${withval} | sed "s/,/ /g"`
|
||||||
AC_MSG_RESULT(${DRIVER_BUILD_LIST})
|
AC_MSG_RESULT(${DRIVER_BUILD_LIST})
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
],
|
], [
|
||||||
[
|
|
||||||
DRIVER_BUILD_LIST="all"
|
DRIVER_BUILD_LIST="all"
|
||||||
AC_MSG_RESULT(all available)
|
AC_MSG_RESULT(all available)
|
||||||
]
|
])
|
||||||
)
|
|
||||||
AM_CONDITIONAL(SOME_DRIVERS, test "${DRIVER_BUILD_LIST}" != "all")
|
AM_CONDITIONAL(SOME_DRIVERS, test "${DRIVER_BUILD_LIST}" != "all")
|
||||||
|
|
||||||
if test "${DRIVER_BUILD_LIST}" != "all"; then
|
if test "${DRIVER_BUILD_LIST}" != "all"; then
|
||||||
NUT_REPORT([only build specific drivers], [${DRIVER_BUILD_LIST}])
|
NUT_REPORT([only build specific drivers], [${DRIVER_BUILD_LIST}])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(which driver man pages to install)
|
AC_MSG_CHECKING(which driver man pages to install)
|
||||||
if test "${DRIVER_BUILD_LIST}" = "all"; then
|
if test "${DRIVER_BUILD_LIST}" = "all"; then
|
||||||
DRIVER_MAN_LIST=all
|
DRIVER_MAN_LIST=all
|
||||||
AC_MSG_RESULT(all available)
|
AC_MSG_RESULT(all available)
|
||||||
else
|
else
|
||||||
DRIVER_MAN_LIST=""
|
DRIVER_MAN_LIST=""
|
||||||
for i in ${DRIVER_BUILD_LIST}; do
|
for i in ${DRIVER_BUILD_LIST}; do
|
||||||
if test -f ${srcdir}/man/$i.8; then
|
if test -f ${srcdir}/docs/man/$i.8; then
|
||||||
DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8"
|
DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
AC_MSG_RESULT(${DRIVER_MAN_LIST})
|
AC_MSG_RESULT(${DRIVER_MAN_LIST})
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether to strip debug symbols)
|
AC_MSG_CHECKING(whether to strip debug symbols)
|
||||||
AC_ARG_ENABLE(strip,
|
AC_ARG_ENABLE(strip,
|
||||||
[ --enable-strip Strip debugging symbols from binaries [no]],
|
AS_HELP_STRING([--enable-strip], [Strip debugging symbols from binaries (no)]),
|
||||||
[
|
[
|
||||||
case "${withval}" in
|
case "${withval}" in
|
||||||
no)
|
no)
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
CFLAGS="${CFLAGS} -s"
|
CFLAGS="${CFLAGS} -s"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
],
|
], [
|
||||||
[ AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether to install pkg-config *.pc files)
|
AC_MSG_CHECKING(whether to install pkg-config *.pc files)
|
||||||
AC_ARG_WITH(pkgconfig-dir,
|
AC_ARG_WITH(pkgconfig-dir,
|
||||||
AC_HELP_STRING([--with-pkgconfig-dir=PATH], [where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig)]),
|
AS_HELP_STRING([--with-pkgconfig-dir=PATH], [where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig)]),
|
||||||
[
|
[
|
||||||
case "${withval}" in
|
case "${withval}" in
|
||||||
yes|auto)
|
yes|auto)
|
||||||
;;
|
;;
|
||||||
no)
|
no)
|
||||||
pkgconfigdir=""
|
pkgconfigdir=""
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
pkgconfigdir="${withval}"
|
pkgconfigdir="${withval}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
],
|
], [])
|
||||||
)
|
|
||||||
echo ${pkgconfigdir}
|
|
||||||
if test -n "${pkgconfigdir}"; then
|
if test -n "${pkgconfigdir}"; then
|
||||||
AC_MSG_RESULT(using ${pkgconfigdir})
|
AC_MSG_RESULT(using ${pkgconfigdir})
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}")
|
AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}")
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether to install hotplug rules)
|
AC_MSG_CHECKING(whether to install hotplug rules)
|
||||||
AC_ARG_WITH(hotplug-dir,
|
AC_ARG_WITH(hotplug-dir,
|
||||||
AC_HELP_STRING([--with-hotplug-dir=PATH], [where to install hotplug rules (/etc/hotplug)]),
|
AS_HELP_STRING([--with-hotplug-dir=PATH], [where to install hotplug rules (/etc/hotplug)]),
|
||||||
[
|
[
|
||||||
case "${withval}" in
|
case "${withval}" in
|
||||||
yes)
|
yes)
|
||||||
if test -z "${hotplugdir}"; then
|
if test -z "${hotplugdir}"; then
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
AC_MSG_ERROR(["hotplug directory requested but not found])
|
AC_MSG_ERROR(["hotplug directory requested but not found"])
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
auto)
|
auto)
|
||||||
;;
|
;;
|
||||||
no)
|
no)
|
||||||
hotplugdir=""
|
hotplugdir=""
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
hotplugdir="${withval}"
|
hotplugdir="${withval}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
],
|
], [])
|
||||||
)
|
|
||||||
if test -n "${hotplugdir}"; then
|
if test -n "${hotplugdir}"; then
|
||||||
AC_MSG_RESULT(using ${hotplugdir})
|
AC_MSG_RESULT(using ${hotplugdir})
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(WITH_HOTPLUG, test -n "${hotplugdir}")
|
AM_CONDITIONAL(WITH_HOTPLUG, test -n "${hotplugdir}")
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether to install udev rules)
|
AC_MSG_CHECKING(whether to install udev rules)
|
||||||
AC_ARG_WITH(udev-dir,
|
AC_ARG_WITH(udev-dir,
|
||||||
AC_HELP_STRING([--with-udev-dir=PATH], [where to install udev rules (/lib/udev or /etc/udev)]),
|
AS_HELP_STRING([--with-udev-dir=PATH], [where to install udev rules (/lib/udev or /etc/udev)]),
|
||||||
[
|
[
|
||||||
case "${withval}" in
|
case "${withval}" in
|
||||||
yes)
|
yes)
|
||||||
if test -z "${udevdir}"; then
|
if test -z "${udevdir}"; then
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
AC_MSG_ERROR(["udev directory requested but not found])
|
AC_MSG_ERROR(["udev directory requested but not found"])
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
auto)
|
auto)
|
||||||
;;
|
;;
|
||||||
no)
|
no)
|
||||||
udevdir=""
|
udevdir=""
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
udevdir="${withval}"
|
udevdir="${withval}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
],
|
], [])
|
||||||
)
|
|
||||||
if test -n "${udevdir}"; then
|
if test -n "${udevdir}"; then
|
||||||
AC_MSG_RESULT(using ${udevdir})
|
AC_MSG_RESULT(using ${udevdir})
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(WITH_UDEV, test -n "${udevdir}")
|
AM_CONDITIONAL(WITH_UDEV, test -n "${udevdir}")
|
||||||
|
|
||||||
|
AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])
|
||||||
|
AM_CONDITIONAL([MANUALUPDATE], [test "x$ASCIIDOC" != "xnone"])
|
||||||
|
AC_PATH_PROGS([A2X], [a2x], [none])
|
||||||
|
|
||||||
dnl expand ${sysconfdir} and write it out
|
dnl expand ${sysconfdir} and write it out
|
||||||
conftemp="${sysconfdir}"
|
conftemp="${sysconfdir}"
|
||||||
eval conftemp=\"${conftemp}\"
|
eval conftemp=\"${conftemp}\"
|
||||||
eval conftemp=\"${conftemp}\"
|
eval conftemp=\"${conftemp}\"
|
||||||
CONFPATH=${conftemp}
|
CONFPATH=${conftemp}
|
||||||
AC_DEFINE_UNQUOTED(CONFPATH, "${conftemp}",
|
AC_DEFINE_UNQUOTED(CONFPATH, "${conftemp}", [Default path for configuration files])
|
||||||
[Default path for configuration files])
|
|
||||||
|
|
||||||
dnl same for datadir
|
dnl same for datadir
|
||||||
conftemp="${datadir}"
|
conftemp="${datadir}"
|
||||||
eval conftemp=\"${conftemp}\"
|
eval conftemp=\"${conftemp}\"
|
||||||
eval conftemp=\"${conftemp}\"
|
eval conftemp=\"${conftemp}\"
|
||||||
AC_DEFINE_UNQUOTED(DATADIR, "${conftemp}",
|
AC_DEFINE_UNQUOTED(DATADIR, "${conftemp}", [Default path for data files])
|
||||||
[Default path for data files])
|
|
||||||
|
|
||||||
dnl same for bindir
|
dnl same for bindir
|
||||||
conftemp="${bindir}"
|
conftemp="${bindir}"
|
||||||
eval conftemp=\"${conftemp}\"
|
eval conftemp=\"${conftemp}\"
|
||||||
eval conftemp=\"${conftemp}\"
|
eval conftemp=\"${conftemp}\"
|
||||||
AC_DEFINE_UNQUOTED(BINDIR, "${conftemp}",
|
AC_DEFINE_UNQUOTED(BINDIR, "${conftemp}", [Default path for user executables])
|
||||||
[Default path for user executables])
|
|
||||||
|
|
||||||
AC_SUBST(OS_NAME)
|
AC_SUBST(OS_NAME)
|
||||||
AC_SUBST(LIBSSL_CFLAGS)
|
AC_SUBST(LIBSSL_CFLAGS)
|
||||||
AC_SUBST(LIBSSL_LDFLAGS)
|
AC_SUBST(LIBSSL_LIBS)
|
||||||
AC_SUBST(LIBGD_CFLAGS)
|
AC_SUBST(LIBGD_CFLAGS)
|
||||||
AC_SUBST(LIBGD_LDFLAGS)
|
AC_SUBST(LIBGD_LDFLAGS)
|
||||||
AC_SUBST(LIBNETSNMP_CFLAGS)
|
AC_SUBST(LIBNETSNMP_CFLAGS)
|
||||||
AC_SUBST(LIBNETSNMP_LDFLAGS)
|
AC_SUBST(LIBNETSNMP_LIBS)
|
||||||
AC_SUBST(LIBUSB_CFLAGS)
|
AC_SUBST(LIBUSB_CFLAGS)
|
||||||
AC_SUBST(LIBUSB_LDFLAGS)
|
AC_SUBST(LIBUSB_LIBS)
|
||||||
AC_SUBST(LIBNEON_CFLAGS)
|
AC_SUBST(LIBNEON_CFLAGS)
|
||||||
AC_SUBST(LIBNEON_LDFLAGS)
|
AC_SUBST(LIBNEON_LIBS)
|
||||||
AC_SUBST(LIBPOWERMAN_CFLAGS)
|
AC_SUBST(LIBPOWERMAN_CFLAGS)
|
||||||
AC_SUBST(LIBPOWERMAN_LDFLAGS)
|
AC_SUBST(LIBPOWERMAN_LIBS)
|
||||||
|
AC_SUBST(DOC_BUILD_LIST)
|
||||||
AC_SUBST(LIBWRAP_CFLAGS)
|
AC_SUBST(LIBWRAP_CFLAGS)
|
||||||
AC_SUBST(LIBWRAP_LDFLAGS)
|
AC_SUBST(LIBWRAP_LIBS)
|
||||||
AC_SUBST(HAL_USER)
|
AC_SUBST(HAL_USER)
|
||||||
AC_SUBST(HAL_DEVICE_MATCH_KEY)
|
AC_SUBST(HAL_DEVICE_MATCH_KEY)
|
||||||
AC_SUBST(HAL_FDI_PATH)
|
AC_SUBST(HAL_FDI_PATH)
|
||||||
AC_SUBST(HAL_CALLOUTS_PATH)
|
AC_SUBST(HAL_CALLOUTS_PATH)
|
||||||
AC_SUBST(HAVE_GLIB_2_14)
|
|
||||||
AC_SUBST(LIBHAL_CFLAGS)
|
AC_SUBST(LIBHAL_CFLAGS)
|
||||||
AC_SUBST(LIBHAL_LDFLAGS)
|
AC_SUBST(LIBHAL_LIBS)
|
||||||
AC_SUBST(DRIVER_BUILD_LIST)
|
AC_SUBST(DRIVER_BUILD_LIST)
|
||||||
AC_SUBST(DRIVER_MAN_LIST)
|
AC_SUBST(DRIVER_MAN_LIST)
|
||||||
AC_SUBST(DRIVER_INSTALL_TARGET)
|
AC_SUBST(DRIVER_INSTALL_TARGET)
|
||||||
|
@ -789,13 +905,24 @@ AC_OUTPUT([
|
||||||
data/html/header.html
|
data/html/header.html
|
||||||
data/html/Makefile
|
data/html/Makefile
|
||||||
data/Makefile
|
data/Makefile
|
||||||
|
data/driver.list
|
||||||
docs/Makefile
|
docs/Makefile
|
||||||
|
docs/man/Makefile
|
||||||
|
docs/website/Makefile
|
||||||
drivers/Makefile
|
drivers/Makefile
|
||||||
include/Makefile
|
include/Makefile
|
||||||
lib/libupsclient-config
|
lib/libupsclient-config
|
||||||
lib/libupsclient.pc
|
lib/libupsclient.pc
|
||||||
lib/Makefile
|
lib/Makefile
|
||||||
man/Makefile
|
scripts/augeas/Makefile
|
||||||
|
scripts/augeas/nutnutconf.aug
|
||||||
|
scripts/augeas/nutupsconf.aug
|
||||||
|
scripts/augeas/nutupsdconf.aug
|
||||||
|
scripts/augeas/nutupsdusers.aug
|
||||||
|
scripts/augeas/nutupsmonconf.aug
|
||||||
|
scripts/augeas/nutupsschedconf.aug
|
||||||
|
scripts/augeas/nuthostsconf.aug
|
||||||
|
scripts/augeas/nutupssetconf.aug
|
||||||
scripts/hal/Makefile
|
scripts/hal/Makefile
|
||||||
scripts/hal/ups-nut-device.fdi
|
scripts/hal/ups-nut-device.fdi
|
||||||
scripts/hotplug/Makefile
|
scripts/hotplug/Makefile
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
SUBDIRS = html
|
SUBDIRS = html
|
||||||
|
|
||||||
dist_data_DATA = cmdvartab driver.list
|
dist_data_DATA = cmdvartab
|
||||||
EXTRA_DIST = evolution500.dev
|
nodist_data_DATA = driver.list
|
||||||
|
EXTRA_DIST = evolution500.seq epdu-managed.dev
|
||||||
DATA_FILES = cmdvartab driver.list
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
@ -39,14 +39,15 @@ host_triplet = @host@
|
||||||
target_triplet = @target@
|
target_triplet = @target@
|
||||||
subdir = data
|
subdir = data
|
||||||
DIST_COMMON = $(dist_data_DATA) $(srcdir)/Makefile.am \
|
DIST_COMMON = $(dist_data_DATA) $(srcdir)/Makefile.am \
|
||||||
$(srcdir)/Makefile.in
|
$(srcdir)/Makefile.in $(srcdir)/driver.list.in
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_ipv6.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
|
@ -56,6 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
|
$(top_srcdir)/m4/nut_config_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.in
|
$(top_srcdir)/configure.in
|
||||||
|
@ -63,7 +65,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
mkinstalldirs = $(install_sh) -d
|
mkinstalldirs = $(install_sh) -d
|
||||||
CONFIG_HEADER = $(top_builddir)/include/config.h
|
CONFIG_HEADER = $(top_builddir)/include/config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES = driver.list
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
SOURCES =
|
SOURCES =
|
||||||
DIST_SOURCES =
|
DIST_SOURCES =
|
||||||
|
@ -95,8 +97,8 @@ am__nobase_list = $(am__nobase_strip_setup); \
|
||||||
am__base_list = \
|
am__base_list = \
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||||
am__installdirs = "$(DESTDIR)$(datadir)"
|
am__installdirs = "$(DESTDIR)$(datadir)" "$(DESTDIR)$(datadir)"
|
||||||
DATA = $(dist_data_DATA)
|
DATA = $(dist_data_DATA) $(nodist_data_DATA)
|
||||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||||
distclean-recursive maintainer-clean-recursive
|
distclean-recursive maintainer-clean-recursive
|
||||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||||
|
@ -131,9 +133,11 @@ am__relativize = \
|
||||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||||
done; \
|
done; \
|
||||||
reldir="$$dir2"
|
reldir="$$dir2"
|
||||||
|
A2X = @A2X@
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
|
ASCIIDOC = @ASCIIDOC@
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -146,8 +150,10 @@ CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DBLATEX = @DBLATEX@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -164,7 +170,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@
|
||||||
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
||||||
HAL_FDI_PATH = @HAL_FDI_PATH@
|
HAL_FDI_PATH = @HAL_FDI_PATH@
|
||||||
HAL_USER = @HAL_USER@
|
HAL_USER = @HAL_USER@
|
||||||
HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
@ -175,22 +180,22 @@ LDFLAGS = @LDFLAGS@
|
||||||
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
||||||
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
||||||
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
||||||
LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@
|
LIBHAL_LIBS = @LIBHAL_LIBS@
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@
|
LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
||||||
LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@
|
LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
@ -287,9 +292,9 @@ top_builddir = @top_builddir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
udevdir = @udevdir@
|
udevdir = @udevdir@
|
||||||
SUBDIRS = html
|
SUBDIRS = html
|
||||||
dist_data_DATA = cmdvartab driver.list
|
dist_data_DATA = cmdvartab
|
||||||
EXTRA_DIST = evolution500.dev
|
nodist_data_DATA = driver.list
|
||||||
DATA_FILES = cmdvartab driver.list
|
EXTRA_DIST = evolution500.seq epdu-managed.dev
|
||||||
all: all-recursive
|
all: all-recursive
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
@ -323,6 +328,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
|
driver.list: $(top_builddir)/config.status $(srcdir)/driver.list.in
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||||
|
|
||||||
mostlyclean-libtool:
|
mostlyclean-libtool:
|
||||||
-rm -f *.lo
|
-rm -f *.lo
|
||||||
|
@ -349,6 +356,26 @@ uninstall-dist_dataDATA:
|
||||||
test -n "$$files" || exit 0; \
|
test -n "$$files" || exit 0; \
|
||||||
echo " ( cd '$(DESTDIR)$(datadir)' && rm -f" $$files ")"; \
|
echo " ( cd '$(DESTDIR)$(datadir)' && rm -f" $$files ")"; \
|
||||||
cd "$(DESTDIR)$(datadir)" && rm -f $$files
|
cd "$(DESTDIR)$(datadir)" && rm -f $$files
|
||||||
|
install-nodist_dataDATA: $(nodist_data_DATA)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
test -z "$(datadir)" || $(MKDIR_P) "$(DESTDIR)$(datadir)"
|
||||||
|
@list='$(nodist_data_DATA)'; test -n "$(datadir)" || list=; \
|
||||||
|
for p in $$list; do \
|
||||||
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
|
echo "$$d$$p"; \
|
||||||
|
done | $(am__base_list) | \
|
||||||
|
while read files; do \
|
||||||
|
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(datadir)'"; \
|
||||||
|
$(INSTALL_DATA) $$files "$(DESTDIR)$(datadir)" || exit $$?; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-nodist_dataDATA:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(nodist_data_DATA)'; test -n "$(datadir)" || list=; \
|
||||||
|
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||||
|
test -n "$$files" || exit 0; \
|
||||||
|
echo " ( cd '$(DESTDIR)$(datadir)' && rm -f" $$files ")"; \
|
||||||
|
cd "$(DESTDIR)$(datadir)" && rm -f $$files
|
||||||
|
|
||||||
# This directory's subdirectories are mostly independent; you can cd
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
# into them and run `make' without going through this Makefile.
|
# into them and run `make' without going through this Makefile.
|
||||||
|
@ -357,7 +384,7 @@ uninstall-dist_dataDATA:
|
||||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||||
# (2) otherwise, pass the desired values on the `make' command line.
|
# (2) otherwise, pass the desired values on the `make' command line.
|
||||||
$(RECURSIVE_TARGETS):
|
$(RECURSIVE_TARGETS):
|
||||||
@failcom='exit 1'; \
|
@fail= failcom='exit 1'; \
|
||||||
for f in x $$MAKEFLAGS; do \
|
for f in x $$MAKEFLAGS; do \
|
||||||
case $$f in \
|
case $$f in \
|
||||||
*=* | --[!k]*);; \
|
*=* | --[!k]*);; \
|
||||||
|
@ -382,7 +409,7 @@ $(RECURSIVE_TARGETS):
|
||||||
fi; test -z "$$fail"
|
fi; test -z "$$fail"
|
||||||
|
|
||||||
$(RECURSIVE_CLEAN_TARGETS):
|
$(RECURSIVE_CLEAN_TARGETS):
|
||||||
@failcom='exit 1'; \
|
@fail= failcom='exit 1'; \
|
||||||
for f in x $$MAKEFLAGS; do \
|
for f in x $$MAKEFLAGS; do \
|
||||||
case $$f in \
|
case $$f in \
|
||||||
*=* | --[!k]*);; \
|
*=* | --[!k]*);; \
|
||||||
|
@ -548,7 +575,7 @@ check: check-recursive
|
||||||
all-am: Makefile $(DATA)
|
all-am: Makefile $(DATA)
|
||||||
installdirs: installdirs-recursive
|
installdirs: installdirs-recursive
|
||||||
installdirs-am:
|
installdirs-am:
|
||||||
for dir in "$(DESTDIR)$(datadir)"; do \
|
for dir in "$(DESTDIR)$(datadir)" "$(DESTDIR)$(datadir)"; do \
|
||||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
done
|
done
|
||||||
install: install-recursive
|
install: install-recursive
|
||||||
|
@ -596,7 +623,7 @@ info: info-recursive
|
||||||
|
|
||||||
info-am:
|
info-am:
|
||||||
|
|
||||||
install-data-am: install-dist_dataDATA
|
install-data-am: install-dist_dataDATA install-nodist_dataDATA
|
||||||
|
|
||||||
install-dvi: install-dvi-recursive
|
install-dvi: install-dvi-recursive
|
||||||
|
|
||||||
|
@ -640,7 +667,7 @@ ps: ps-recursive
|
||||||
|
|
||||||
ps-am:
|
ps-am:
|
||||||
|
|
||||||
uninstall-am: uninstall-dist_dataDATA
|
uninstall-am: uninstall-dist_dataDATA uninstall-nodist_dataDATA
|
||||||
|
|
||||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
|
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
|
||||||
install-am install-strip tags-recursive
|
install-am install-strip tags-recursive
|
||||||
|
@ -653,12 +680,13 @@ uninstall-am: uninstall-dist_dataDATA
|
||||||
install-data-am install-dist_dataDATA install-dvi \
|
install-data-am install-dist_dataDATA install-dvi \
|
||||||
install-dvi-am install-exec install-exec-am install-html \
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
install-html-am install-info install-info-am install-man \
|
install-html-am install-info install-info-am install-man \
|
||||||
install-pdf install-pdf-am install-ps install-ps-am \
|
install-nodist_dataDATA install-pdf install-pdf-am install-ps \
|
||||||
install-strip installcheck installcheck-am installdirs \
|
install-ps-am install-strip installcheck installcheck-am \
|
||||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
installdirs installdirs-am maintainer-clean \
|
||||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||||
ps ps-am tags tags-recursive uninstall uninstall-am \
|
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
|
||||||
uninstall-dist_dataDATA
|
uninstall uninstall-am uninstall-dist_dataDATA \
|
||||||
|
uninstall-nodist_dataDATA
|
||||||
|
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
|
725
data/driver.list
|
@ -1,725 +0,0 @@
|
||||||
# Network UPS Tools driver.list
|
|
||||||
#
|
|
||||||
# This file is used to build the compat.html on the web server. Any line
|
|
||||||
# with exactly 4 arguments will be turned into an entry on there.
|
|
||||||
# Naturally, it is read by parseconf, so the usual escaping tricks are
|
|
||||||
# allowed if you need to insert something unusual.
|
|
||||||
#
|
|
||||||
# If you write a new driver, modify an existing one to add more support,
|
|
||||||
# or just know about some equipment that isn't listed but should be,
|
|
||||||
# please send me a patch to update this file.
|
|
||||||
#
|
|
||||||
# The format:
|
|
||||||
#
|
|
||||||
# <manufacturer> <model name> <model extra> <driver>
|
|
||||||
#
|
|
||||||
# Note that the "upstype=nn" format must be used for genericups entries,
|
|
||||||
# as they will be parsed by new configuration helper software.
|
|
||||||
#
|
|
||||||
# Duplicate text in the last field will be cooked out during the conversion
|
|
||||||
# to HTML with ROWSPAN magic. They must be an exact match for this to work.
|
|
||||||
|
|
||||||
"Ablerex" "MS-RT" "" "megatec"
|
|
||||||
"Ablerex" "625L" "USB" "megatec_usb"
|
|
||||||
"Ablerex" "Hope Office 400/600" "" "megatec"
|
|
||||||
|
|
||||||
"ActivePower" "400VA" "" "megatec"
|
|
||||||
"ActivePower" "1400VA" "" "megatec"
|
|
||||||
"ActivePower" "2000VA" "" "megatec"
|
|
||||||
|
|
||||||
"Advice" "TopGuard 2000" "" "megatec"
|
|
||||||
|
|
||||||
"AEC" "MiniGuard UPS 700" "Megatec M2501 cable" "genericups upstype=21"
|
|
||||||
|
|
||||||
"APC" "Back-UPS Pro" "" "apcsmart"
|
|
||||||
"APC" "Matrix-UPS" "" "apcsmart"
|
|
||||||
"APC" "Smart-UPS" "" "apcsmart"
|
|
||||||
"APC" "Back-UPS Pro USB" "USB" "usbhid-ups"
|
|
||||||
"APC" "Back-UPS USB" "USB" "usbhid-ups"
|
|
||||||
"APC" "Back-UPS RS USB" "USB" "usbhid-ups"
|
|
||||||
"APC" "Back-UPS LS USB" "USB" "usbhid-ups"
|
|
||||||
"APC" "Back-UPS ES/CyberFort 350" "USB" "usbhid-ups"
|
|
||||||
"APC" "Back-UPS BF500" "USB" "usbhid-ups"
|
|
||||||
"APC" "BACK-UPS XS LCD" "USB" "usbhid-ups"
|
|
||||||
"APC" "Smart-UPS USB" "USB" "usbhid-ups"
|
|
||||||
"APC" "Back-UPS" "940-0095A/C cables" "genericups upstype=1"
|
|
||||||
"APC" "Back-UPS" "940-0020B/C cables" "genericups upstype=2"
|
|
||||||
"APC" "Back-UPS" "940-0023A cable" "genericups upstype=9"
|
|
||||||
"APC" "Back-UPS Office" "940-0119A cable" "genericups upstype=12"
|
|
||||||
"APC" "Back-UPS RS 500" "custom non-USB cable" "genericups upstype=20"
|
|
||||||
"APC" "Masterswitch" "Not a UPS - 940-0020 cable" "genericups upstype=12"
|
|
||||||
"APC" "AP9210" "8 outlets" "powerman-pdu (experimental)"
|
|
||||||
"APC" "AP79xx" "8 to 24 outlets" "powerman-pdu (experimental)"
|
|
||||||
"APC" "(various)" "SNMP monitoring card" "snmp-ups (experimental)"
|
|
||||||
|
|
||||||
"Aphel" "PDU" "no report, but various models should be supported" "snmp-ups (experimental)"
|
|
||||||
|
|
||||||
"Apollo" "1000A" "" "genericups upstype=4"
|
|
||||||
"Apollo" "1000F" "" "genericups upstype=4"
|
|
||||||
|
|
||||||
"Appro" "SWPDU" "48 outlets" "powerman-pdu (experimental)"
|
|
||||||
|
|
||||||
"Atlantis Land" "A03-P826" "" "megatec"
|
|
||||||
|
|
||||||
"Baytech" "RPC3" "8 outlets" "powerman-pdu (experimental)"
|
|
||||||
"Baytech" "RPC3-20NC" "8 outlets" "powerman-pdu (experimental)"
|
|
||||||
"Baytech" "RPC28-30NC" "20 outlets" "powerman-pdu (experimental)"
|
|
||||||
"Baytech" "various RPC" "" "snmp-ups"
|
|
||||||
|
|
||||||
"Belkin" "Active Battery Backup BU30 series" "USB" "megatec_usb"
|
|
||||||
"Belkin" "Home Office F6H350-SER" "" "genericups upstype=7"
|
|
||||||
"Belkin" "Home Office F6H500-SER" "" "genericups upstype=7"
|
|
||||||
"Belkin" "Home Office F6H650-SER" "" "genericups upstype=7"
|
|
||||||
"Belkin" "F6H375-USB" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups"
|
|
||||||
"Belkin" "F6H375-USB" "USB (2007 models, vendor id: 0665)" "megatec_usb"
|
|
||||||
"Belkin" "Office Series F6C550-AVR" "USB" "usbhid-ups"
|
|
||||||
"Belkin" "Regulator Pro" "F6C525-SER, F6C625-SER" "belkin"
|
|
||||||
"Belkin" "Resource" "" "genericups upstype=4"
|
|
||||||
"Belkin" "Small Enterprise F6C1500-TW-RK" "serial port" "belkin"
|
|
||||||
"Belkin" "Small Enterprise F6C1500-TW-RK" "USB" "usbhid-ups"
|
|
||||||
"Belkin" "Universal UPS F6C100-UNV" "USB" "usbhid-ups"
|
|
||||||
"Belkin" "Universal UPS F6C120-UNV" "serial port" "belkinunv"
|
|
||||||
"Belkin" "Universal UPS F6C120-UNV" "USB" "usbhid-ups"
|
|
||||||
"Belkin" "Universal UPS F6C800-UNV" "serial port" "belkinunv"
|
|
||||||
"Belkin" "Universal UPS F6C800-UNV" "USB" "usbhid-ups"
|
|
||||||
"Belkin" "Universal UPS F6C1100-UNV" "serial port (<= 2005 models)" "belkinunv"
|
|
||||||
"Belkin" "Universal UPS F6C1100-UNV" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups"
|
|
||||||
"Belkin" "Universal UPS F6C1100-UNV" "USB (2007 models, vendor id: 0665)" "megatec_usb"
|
|
||||||
"Belkin" "Universal UPS F6C1200-UNV" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups"
|
|
||||||
"Belkin" "Universal UPS F6C1200-UNV" "USB (2007 models, vendor id: 0665)" "megatec_usb"
|
|
||||||
"Belkin" "Universal UPS F6H350deUNV" "serial port" "megatec"
|
|
||||||
"Belkin" "Universal UPS F6H350ukUNV" "serial port" "megatec"
|
|
||||||
"Belkin" "Universal UPS F6H500ukUNV" "serial port" "megatec"
|
|
||||||
"Belkin" "Universal UPS F6H650ukUNV" "serial port" "megatec"
|
|
||||||
|
|
||||||
"Best Power" "Fortress (old)" "" "bestfortress"
|
|
||||||
"Best Power" "Fortress (newer)" "" "bestups"
|
|
||||||
"Best Power" "Fortress Telecom" "" "bestups"
|
|
||||||
"Best Power" "Axxium Rackmount" "" "bestups"
|
|
||||||
"Best Power" "Patriot Pro" "" "bestups"
|
|
||||||
"Best Power" "Patriot Pro II" "" "bestups"
|
|
||||||
"Best Power" "Patriot" "INT51 cable" "genericups upstype=6"
|
|
||||||
"Best Power" "Micro-Ferrups" "" "bestuferrups"
|
|
||||||
"Best Power" "Fortress/Ferrups" "f-command support" "bestfcom"
|
|
||||||
|
|
||||||
"Chloride" "Desk Power 650" "serial port" "megatec"
|
|
||||||
|
|
||||||
"Cito Power" "CPG-SR1000" "" "megatec"
|
|
||||||
|
|
||||||
"Clary" "ST-800" "" "gamatronic"
|
|
||||||
|
|
||||||
"Compaq" "T1500h" "" "upscode2 use_pre_lf"
|
|
||||||
"Compaq" "R3000h" "" "upscode2"
|
|
||||||
"Compaq" "R3000 XR" "" "bcmxcp"
|
|
||||||
"Compaq" "R5500 XR" "" "bcmxcp"
|
|
||||||
|
|
||||||
"Cyber Power Systems" "320AVR" "" "powerpanel or cyberpower"
|
|
||||||
"Cyber Power Systems" "500AVR" "" "powerpanel or cyberpower"
|
|
||||||
"Cyber Power Systems" "650AVR" "" "powerpanel or cyberpower"
|
|
||||||
"Cyber Power Systems" "700AVR" "" "powerpanel or cyberpower"
|
|
||||||
"Cyber Power Systems" "800AVR" "" "powerpanel or cyberpower"
|
|
||||||
"Cyber Power Systems" "850AVR" "" "powerpanel or cyberpower"
|
|
||||||
"Cyber Power Systems" "900AVR" "" "powerpanel or cyberpower"
|
|
||||||
"Cyber Power Systems" "1250AVR" "" "powerpanel or cyberpower"
|
|
||||||
"Cyber Power Systems" "1500AVR" "" "powerpanel or cyberpower"
|
|
||||||
"Cyber Power Systems" "Power99" "" "genericups upstype=7"
|
|
||||||
"Cyber Power Systems" "550SL" "" "genericups upstype=7"
|
|
||||||
"Cyber Power Systems" "725SL" "" "genericups upstype=7"
|
|
||||||
"Cyber Power Systems" "CPS825VA" "" "powerpanel"
|
|
||||||
"Cyber Power Systems" "1100AVR" "" "powerpanel"
|
|
||||||
"Cyber Power Systems" "1200AVR" "" "powerpanel"
|
|
||||||
"Cyber Power Systems" "1500AVR-HO" "" "powerpanel"
|
|
||||||
"Cyber Power Systems" "PR2200" "" "powerpanel"
|
|
||||||
"Cyber Power Systems" "PR3000E" "" "powerpanel (experimental)"
|
|
||||||
"Cyber Power Systems" "685AVR" "USB" "usbhid-ups"
|
|
||||||
"Cyber Power Systems" "800AVR" "USB" "usbhid-ups"
|
|
||||||
"Cyber Power Systems" "AE550" "USB" "usbhid-ups"
|
|
||||||
"Cyber Power Systems" "CP 1500C" "USB" "usbhid-ups"
|
|
||||||
"Cyber Power Systems" "OR2200LCDRM2U" "USB" "usbhid-ups"
|
|
||||||
"Cyber Power Systems" "Value 400E" "USB" "usbhid-ups"
|
|
||||||
"Cyber Power Systems" "Value 600E" "USB" "usbhid-ups"
|
|
||||||
"Cyber Power Systems" "Value 800E" "USB" "usbhid-ups"
|
|
||||||
|
|
||||||
"Cyclades" "PM8" "8 outlets" "powerman-pdu (experimental)"
|
|
||||||
"Cyclades" "PM10" "10 outlets" "powerman-pdu (experimental)"
|
|
||||||
|
|
||||||
"Dell" "Dell UPS Tower 500W LV / HV" "USB port" "usbhid-ups"
|
|
||||||
"Dell" "Dell UPS Tower 500W LV / HV" "Serial port" "newmge-shut"
|
|
||||||
"Dell" "Dell UPS Rack/Tower 1000W LV / HV" "USB port" "usbhid-ups"
|
|
||||||
"Dell" "Dell UPS Rack/Tower 1000W LV / HV" "Serial port" "newmge-shut"
|
|
||||||
"Dell" "Dell UPS Rack/Tower 1500W LV" "USB port" "usbhid-ups"
|
|
||||||
"Dell" "Dell UPS Rack/Tower 1500W LV" "Serial port" "newmge-shut"
|
|
||||||
"Dell" "Dell UPS Rack/Tower 1920W LV / HV" "USB port" "usbhid-ups"
|
|
||||||
"Dell" "Dell UPS Rack/Tower 1920W LV / HV" "Serial port" "newmge-shut"
|
|
||||||
"Dell" "Dell UPS Rack/Tower 2300W LV" "USB port" "usbhid-ups"
|
|
||||||
"Dell" "Dell UPS Rack/Tower 2300W LV" "Serial port" "newmge-shut"
|
|
||||||
"Dell" "Dell UPS Rack/Tower 2700W LV / HV" "USB port" "usbhid-ups"
|
|
||||||
"Dell" "Dell UPS Rack/Tower 2700W LV / HV" "Serial port" "newmge-shut"
|
|
||||||
"Dell" "Dell UPS Short Depth Rack 2700W High Efficiency Online LV / HV" "USB port" "usbhid-ups"
|
|
||||||
"Dell" "Dell UPS Short Depth Rack 2700W High Efficiency Online LV / HV" "Serial port" "newmge-shut"
|
|
||||||
"Dell" "Dell UPS Rack 3750W High Efficiency Online HV" "USB port" "usbhid-ups"
|
|
||||||
"Dell" "Dell UPS Rack 3750W High Efficiency Online HV" "Serial port" "newmge-shut"
|
|
||||||
"Dell" "Dell UPS Rack 4200W High Efficiency Online HV" "USB port" "usbhid-ups"
|
|
||||||
"Dell" "Dell UPS Rack 4200W High Efficiency Online HV" "Serial port" "newmge-shut"
|
|
||||||
"Dell" "Dell UPS Rack 5600W HV" "USB port" "usbhid-ups"
|
|
||||||
"Dell" "Dell UPS Rack 5600W HV" "Serial port" "newmge-shut"
|
|
||||||
|
|
||||||
"Delta" "GES602N" "" "belkin"
|
|
||||||
|
|
||||||
"Deltec" "PowerRite Pro II" "" "genericups upstype=15"
|
|
||||||
|
|
||||||
"Digital Loggers" "LPC, EPCR2, DIN" "8 outlets" "powerman-pdu (experimental)"
|
|
||||||
|
|
||||||
"Digitus" "DN-170020" "" "megatec"
|
|
||||||
|
|
||||||
"Dynamix" "UPS1700D" "" "megatec"
|
|
||||||
"Dynamix" "UPS-650VA" "" "megatec ignoreoff"
|
|
||||||
|
|
||||||
"Dynex" "975AVR" "" "genericups upstype=7"
|
|
||||||
"Dynex" "DX-800U" "USB" "usbhid-ups"
|
|
||||||
|
|
||||||
"Eaton" "Protection Station 500/650/800 VA" "USB" "usbhid-ups"
|
|
||||||
"Eaton" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups"
|
|
||||||
"Eaton" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups"
|
|
||||||
"Eaton" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups"
|
|
||||||
"Eaton" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups"
|
|
||||||
"Eaton" "EX 700/1000/1500 VA" "USB port" "usbhid-ups"
|
|
||||||
"Eaton" "EX 2200/3000/3000 XL VA" "USB port" "usbhid-ups"
|
|
||||||
"Eaton" "EX 1000 RT2U / 1500 RT2U" "USB port" "usbhid-ups"
|
|
||||||
"Eaton" "MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups"
|
|
||||||
"Eaton" "Nova AVR 625/1250" "USB" "usbhid-ups"
|
|
||||||
"Eaton" "E Series NV UPS 400-2000 VA" "" "megatec_usb"
|
|
||||||
"Eaton" "E Series DX UPS 1-20 kVA" "" "mge-utalk"
|
|
||||||
"Eaton" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"Eaton" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"Eaton" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"Eaton" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"Eaton" "EX 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"Eaton" "EX 2200/3000/3000 XL VA" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"Eaton" "EX 1000 RT2U / 1500 RT2U" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"Eaton" "MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"Eaton" "EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut"
|
|
||||||
"Eaton" "EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut"
|
|
||||||
"Eaton" "EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)"
|
|
||||||
"Eaton" "EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)"
|
|
||||||
"Eaton" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)"
|
|
||||||
"Eaton" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)"
|
|
||||||
"Eaton" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)"
|
|
||||||
"Eaton" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)"
|
|
||||||
"Eaton" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)"
|
|
||||||
"Eaton" "ePDU Managed" "" "snmp-ups (experimental)"
|
|
||||||
"Eaton" "ePDU Monitored" "" "snmp-ups or netxml-ups"
|
|
||||||
"Eaton" "Powerware 9130" "" "bcmxcp or usbhid-ups"
|
|
||||||
|
|
||||||
"Effekta" "MI/MT/MH" "2502 cable" "megatec"
|
|
||||||
"Effekta" "RM2000MH" "" "megatec"
|
|
||||||
|
|
||||||
"Energy Sistem" "(various)" "" "megatec"
|
|
||||||
|
|
||||||
"ETA" "mini+UPS" "WinNT/Upsoft cable" "genericups upstype=7"
|
|
||||||
"ETA" "mini+UPS PRO" "UPS Explorer cable" "etapro"
|
|
||||||
|
|
||||||
"Ever UPS" "NET *-DPC" "" "everups"
|
|
||||||
"Ever UPS" "AP *-PRO" "" "everups"
|
|
||||||
|
|
||||||
"Ever-Power" "625/1000" "" "safenet"
|
|
||||||
|
|
||||||
"Exide" "NetUPS SE" "" "genericups upstype=15"
|
|
||||||
|
|
||||||
"Fenton Technologies" "PowerPal" "P-series" "safenet"
|
|
||||||
"Fenton Technologies" "PowerPal" "L-series" "megatec"
|
|
||||||
"Fenton Technologies" "PowerOn" "" "megatec"
|
|
||||||
"Fenton Technologies" "PowerPure" "" "megatec"
|
|
||||||
|
|
||||||
"Fairstone" "L525/L625/L750" "" "safenet"
|
|
||||||
|
|
||||||
"Fideltronik" "Ares 700 and larger" "" "genericups upstype=6"
|
|
||||||
"Fideltronik" "Other Ares models" "" "genericups upstype=19"
|
|
||||||
|
|
||||||
"Fiskars" "PowerRite MAX" "" "upscode2"
|
|
||||||
"Fiskars" "PowerServer 10" "" "upscode2"
|
|
||||||
"Fiskars" "PowerServer 30" "" "upscode2"
|
|
||||||
"Fiskars" "9200" "UPS Information Unit" "upscode2"
|
|
||||||
|
|
||||||
"Forza Power Technologies" "SL-1001" "USB" "megatec_usb"
|
|
||||||
|
|
||||||
"Gamatronic" "All models with alarm interface" "" "genericups upstype=22"
|
|
||||||
"Gamatronic" "G-SmartCompact 2000" "" "megatec"
|
|
||||||
"Gamatronic" "MP110/210" "" "gamatronic"
|
|
||||||
"Gamatronic" "MS-T" "" "gamatronic"
|
|
||||||
"Gamatronic" "MS" "" "gamatronic"
|
|
||||||
"Gamatronic" "µPS3/1" "" "gamatronic"
|
|
||||||
|
|
||||||
"Geek Squad" "GS1285U" "USB" "usbhid-ups"
|
|
||||||
|
|
||||||
"Gemini" "UPS625/UPS1000" "" "safenet"
|
|
||||||
|
|
||||||
"HP" "PowerTrust 2997A" "HP 5061-2575 cable" "apcsmart"
|
|
||||||
"HP" "R3000 XR" "" "bcmxcp"
|
|
||||||
"HP" "R5500 XR" "" "bcmxcp"
|
|
||||||
"HP" "R1500 G2" "" "bcmxcp"
|
|
||||||
"HP" "R/T 2200 G2" "" "usbhid-ups"
|
|
||||||
"HP" "T500" "older models" "bcmxcp_usb"
|
|
||||||
"HP" "T750 INTL" "" "usbhid-ups"
|
|
||||||
"HP" "T750" "older models" "bcmxcp_usb"
|
|
||||||
"HP" "HP3488 Switch/Control Unit" "" "powerman-pdu (experimental)"
|
|
||||||
|
|
||||||
"IBM" "Blade Center Management Module" "15 outlets" "powerman-pdu (experimental)"
|
|
||||||
|
|
||||||
"ICS" "8064 Ethernet Relay Interface" "16 outlets" "powerman-pdu (experimental)"
|
|
||||||
|
|
||||||
"INELT" "Monolith 1000LT" "" "megatec"
|
|
||||||
|
|
||||||
"Inform" "GUARD" "Line Interactive AP model" "powercom"
|
|
||||||
"Inform" "Guard S 1500AP" "" "megatec"
|
|
||||||
"Inform" "Informer Compact 1000VA" "" "megatec or blazer_ser"
|
|
||||||
|
|
||||||
"Infosec" "iPEL 350" "" "megatec"
|
|
||||||
"Infosec" "iPEL 500" "" "megatec"
|
|
||||||
"Infosec" "iPEL 750" "" "megatec"
|
|
||||||
"Infosec" "iPEL 1000" "" "megatec"
|
|
||||||
"Infosec" "500XP" "" "megatec"
|
|
||||||
"Infosec" "XP 500" "USB" "megatec_usb"
|
|
||||||
"Infosec" "XP 1000" "" "megatec"
|
|
||||||
|
|
||||||
"IPMI" "" "" "powerman-pdu (experimental)"
|
|
||||||
|
|
||||||
"Ippon" "Back Power Pro 400/500/600/700/800" "" "blazer_ser or megatec"
|
|
||||||
"Ippon" "Back Power Pro 400/500/600/700/800" "USB" "blazer_usb (experimental)"
|
|
||||||
"Ippon" "Back Comfo Pro 600/800" "" "blazer_ser or megatec"
|
|
||||||
"Ippon" "Back Comfo Pro 600/800" "USB" "blazer_usb (experimental)"
|
|
||||||
"Ippon" "Smart Power Pro 1000/1400/2000" "" "blazer_ser or megatec"
|
|
||||||
"Ippon" "Smart Power Pro 1000/1400/2000" "USB" "blazer_usb (experimental)"
|
|
||||||
"Ippon" "Smart Winner 750/1000/1500/2000/3000" "" "blazer_ser or megatec"
|
|
||||||
"Ippon" "Smart Winner 750/1000/1500/2000/3000" "USB" "blazer_usb (experimental)"
|
|
||||||
"Ippon" "(various)" "" "blazer_ser or megatec"
|
|
||||||
"Ippon" "(various)" "USB" "blazer_usb"
|
|
||||||
|
|
||||||
"IVT" "SCD series" "" "ivtscd"
|
|
||||||
|
|
||||||
"Jageson Technology" "Jasuny USPS" "" "genericups upstype=4"
|
|
||||||
|
|
||||||
"Kebo" "1200D/D Series" "" "megatec"
|
|
||||||
|
|
||||||
"Krauler" "UP-D1200VA" "USB" "megatec_usb ignoreoff"
|
|
||||||
"Krauler" "UP-M500VA" "USB" "megatec_usb"
|
|
||||||
|
|
||||||
"Lestar" "MD-800E" "" "megatec"
|
|
||||||
|
|
||||||
"Liebert" "ITON 600VA" "" "megatec"
|
|
||||||
"Liebert" "UPStation GXT2" "contact-closure cable" "liebert"
|
|
||||||
"Liebert" "GXT2-3000RT230" "" "liebertgxt2 (experimental)"
|
|
||||||
"Liebert" "PowerSure Personal XT" "USB" "usbhid-ups"
|
|
||||||
"Liebert" "PowerSure PSA" "USB" "usbhid-ups"
|
|
||||||
|
|
||||||
"LNXI" "Icebox" "10 outlets" "powerman-pdu (experimental)"
|
|
||||||
|
|
||||||
"Masterguard" "(various)" "" "masterguard"
|
|
||||||
|
|
||||||
"Maxxtro" "UPS 600 VA" "serial port" "megatec"
|
|
||||||
|
|
||||||
"Mecer" "ME-2000" "" "megatec"
|
|
||||||
|
|
||||||
"Meta System" "HF Line" "1..4 boards" "metasys"
|
|
||||||
"Meta System" "HF Line \/2" "5..8 boards" "metasys"
|
|
||||||
"Meta System" "HF Millennium 810" "" "metasys"
|
|
||||||
"Meta System" "HF Millennium 820" "" "metasys"
|
|
||||||
"Meta System" "HF TOP Line 910" "" "metasys"
|
|
||||||
"Meta System" "HF TOP Line 920" "" "metasys"
|
|
||||||
"Meta System" "HF TOP Line 930" "" "metasys"
|
|
||||||
"Meta System" "HF TOP Line 940" "" "metasys"
|
|
||||||
"Meta System" "HF TOP Line 950" "" "metasys"
|
|
||||||
"Meta System" "HF TOP Line 960" "" "metasys"
|
|
||||||
"Meta System" "HF TOP Line 970" "" "metasys"
|
|
||||||
"Meta System" "HF TOP Line 980" "" "metasys"
|
|
||||||
"Meta System" "ECO Network 750" "" "metasys"
|
|
||||||
"Meta System" "ECO Network 1000" "" "metasys"
|
|
||||||
"Meta System" "ECO Network 1050" "" "metasys"
|
|
||||||
"Meta System" "ECO Network 1500" "" "metasys"
|
|
||||||
"Meta System" "ECO Network 1800" "" "metasys"
|
|
||||||
"Meta System" "ECO Network 2000" "" "metasys"
|
|
||||||
"Meta System" "ECO Network 2100" "" "metasys"
|
|
||||||
"Meta System" "ECO Network 2500" "" "metasys"
|
|
||||||
"Meta System" "ECO Network 3000" "" "metasys"
|
|
||||||
"Meta System" "ECO 305" "" "metasys"
|
|
||||||
"Meta System" "ECO 308" "" "metasys"
|
|
||||||
"Meta System" "ECO 311" "" "metasys"
|
|
||||||
"Meta System" "ECO 511" "" "metasys"
|
|
||||||
"Meta System" "ECO 516" "" "metasys"
|
|
||||||
"Meta System" "ECO 519" "" "metasys"
|
|
||||||
"Meta System" "ECO 522" "" "metasys"
|
|
||||||
"Meta System" "ally HF 800" "" "metasys"
|
|
||||||
"Meta System" "ally HF 1000" "" "metasys"
|
|
||||||
"Meta System" "ally HF 1250" "" "metasys"
|
|
||||||
"Meta System" "ally HF 1600" "" "metasys"
|
|
||||||
"Meta System" "ally HF 2000" "" "metasys"
|
|
||||||
"Meta System" "ally HF 2500" "" "metasys"
|
|
||||||
"Meta System" "Megaline 1250" "" "metasys"
|
|
||||||
"Meta System" "Megaline 2500" "" "metasys"
|
|
||||||
"Meta System" "Megaline 3750" "" "metasys"
|
|
||||||
"Meta System" "Megaline 5000" "" "metasys"
|
|
||||||
"Meta System" "Megaline 6250" "" "metasys"
|
|
||||||
"Meta System" "Megaline 7500" "" "metasys"
|
|
||||||
"Meta System" "Megaline 8750" "" "metasys"
|
|
||||||
"Meta System" "Megaline 10000" "" "metasys"
|
|
||||||
|
|
||||||
"MGE Office Protection Systems" "Protection Center 500/675 VA" "USB" "usbhid-ups"
|
|
||||||
"MGE Office Protection Systems" "Protection Station 500/650/800 VA" "USB" "usbhid-ups"
|
|
||||||
"MGE Office Protection Systems" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups"
|
|
||||||
"MGE Office Protection Systems" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups"
|
|
||||||
"MGE Office Protection Systems" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups"
|
|
||||||
"MGE Office Protection Systems" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups"
|
|
||||||
"MGE Office Protection Systems" "Pulsar 700/1000/1500 VA" "USB port" "usbhid-ups"
|
|
||||||
"MGE Office Protection Systems" "Pulsar M 2200/3000 VA" "USB port" "usbhid-ups"
|
|
||||||
"MGE Office Protection Systems" "Pulsar MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups"
|
|
||||||
"MGE Office Protection Systems" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"MGE Office Protection Systems" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"MGE Office Protection Systems" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE Office Protection Systems" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE Office Protection Systems" "Pulsar 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE Office Protection Systems" "Pulsar M 2200/3000 VA" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE Office Protection Systems" "Pulsar MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE Office Protection Systems" "Comet EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut"
|
|
||||||
"MGE Office Protection Systems" "Comet EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut"
|
|
||||||
"MGE Office Protection Systems" "Comet EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)"
|
|
||||||
"MGE Office Protection Systems" "Comet EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)"
|
|
||||||
"MGE Office Protection Systems" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)"
|
|
||||||
"MGE Office Protection Systems" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)"
|
|
||||||
"MGE Office Protection Systems" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)"
|
|
||||||
"MGE Office Protection Systems" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)"
|
|
||||||
|
|
||||||
"MGE UPS SYSTEMS" "Comet EX RT" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Comet EX RT 3:1" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Protection Center 420" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Protection Center 500" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Protection Center 675" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "NOVA AVR 600 USB" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "NOVA AVR 1100 USB" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar Ellipse USBS" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar Ellipse USB" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar Ellipse Premium USBS" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar Ellipse Premium USB" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse Office 600" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse Office 750" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse Office 1000" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse Office 1500" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse MAX 600" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse MAX 850" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse MAX 1100" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse MAX 1500" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar Evolution" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution 650" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution 850" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution 1150" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution S 1250" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution 1550" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution S 1750" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution 2000" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution S 2500" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution S 3000" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar M 2200" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar M 3000" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar M 3000 XL" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar 700" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar 1000" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar 1500" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar 1000 RT2U" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar 1500 RT2U" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar MX 4000 RT" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar MX 5000 RT" "USB" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "Comet / Galaxy (USB)" "USB Card (ref 66067)" "usbhid-ups"
|
|
||||||
"MGE UPS SYSTEMS" "NOVA AVR 600 Serial" "" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "NOVA AVR 1100 Serial" "" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar Ellipse USBS" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar Ellipse S" "" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar Ellipse Premium USBS" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar Ellipse Premium S" "" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse Office 600" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse Office 750" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse Office 1000" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse Office 1500" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse MAX 600" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse MAX 850" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse MAX 1100" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Ellipse MAX 1500" "Serial cable" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar EXtreme C / EX RT" "" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Comet EX RT" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Comet EX RT 3:1" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar Esprit" "" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution 650" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution 850" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution 1150" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution S 1250" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution 1550" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution S 1750" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution 2000" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution S 2500" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Evolution S 3000" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar M 2200" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar M 3000" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar M 3000 XL" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar 700" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar 1000" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar 1500" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar 1000 RT2U" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar 1500 RT2U" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar MX 4000 RT" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar MX 5000 RT" "Serial port" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar Evolution" "Serial port" "mge-shut or newmge-shut or mge-utalk"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar EXtreme C" "" "mge-shut or newmge-shut or mge-utalk"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar ES+" "" "mge-utalk"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar ESV+" "" "mge-utalk"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar SV" "" "mge-utalk"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar ESV" "" "mge-utalk"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar EX" "" "mge-utalk"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar EXL" "" "mge-utalk"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar PSX" "" "mge-utalk"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar SX" "" "mge-utalk"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar EXtreme" "" "mge-utalk"
|
|
||||||
"MGE UPS SYSTEMS" "Comet EXtreme" "" "mge-utalk"
|
|
||||||
"MGE UPS SYSTEMS" "Comet / Galaxy (Serial)" "Utalk Serial Card (ref 66060)" "mge-utalk"
|
|
||||||
"MGE UPS SYSTEMS" "Comet / Galaxy (Serial)" "HID COM Serial Card (ref 66066)" "mge-shut or newmge-shut"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar / Comet / Galaxy (SNMP)" "SNMP/Web Transverse card (ref 66074)" "snmp-ups (experimental)"
|
|
||||||
"MGE UPS SYSTEMS" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)"
|
|
||||||
"MGE UPS SYSTEMS" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar / Comet / Galaxy (SNMP)" "SNMP card (ref 66062)" "snmp-ups (experimental)"
|
|
||||||
"MGE UPS SYSTEMS" "Pulsar (SNMP)" "SNMP card (ref 66045)" "snmp-ups (experimental)"
|
|
||||||
"MGE UPS SYSTEMS" "UM-Link (SNMP)" "Not a UPS (ref 66850)" "snmp-ups (experimental)"
|
|
||||||
|
|
||||||
"MicroDowell" "B.Box BP 500" "" "powerpanel"
|
|
||||||
"MicroDowell" "B.Box BP 750" "" "powerpanel"
|
|
||||||
"MicroDowell" "B.Box BP 1000" "" "powerpanel"
|
|
||||||
"MicroDowell" "B.Box BP 1500" "" "powerpanel"
|
|
||||||
"MicroDowell" "Enterprise B8" "" "microdowell"
|
|
||||||
"MicroDowell" "Enterprise B10" "" "microdowell"
|
|
||||||
"MicroDowell" "Enterprise N8" "" "microdowell"
|
|
||||||
"MicroDowell" "Enterprise N11" "" "microdowell"
|
|
||||||
"MicroDowell" "Enterprise N15" "" "microdowell"
|
|
||||||
"MicroDowell" "Enterprise N20" "" "microdowell"
|
|
||||||
"MicroDowell" "Enterprise N22" "" "microdowell"
|
|
||||||
"MicroDowell" "Enterprise N30" "" "microdowell"
|
|
||||||
"MicroDowell" "Enterprise N40" "" "microdowell"
|
|
||||||
"MicroDowell" "Enterprise N50" "" "microdowell"
|
|
||||||
"MicroDowell" "Enterprise N60" "" "microdowell"
|
|
||||||
"MicroDowell" "Enterprise HiBox ST" "" "microdowell"
|
|
||||||
|
|
||||||
"Microsol" "Solis 1.0" "1000VA" "solis"
|
|
||||||
"Microsol" "Solis 1.5" "1500VA" "solis"
|
|
||||||
"Microsol" "Solis 2.0" "2000VA" "solis"
|
|
||||||
"Microsol" "Solis 3.0" "3000VA" "solis"
|
|
||||||
"Microsol" "Rhino 6.0" "6000VA" "rhino"
|
|
||||||
"Microsol" "Rhino 7.5" "7500VA" "rhino"
|
|
||||||
"Microsol" "Rhino 10.0" "10000VA" "rhino"
|
|
||||||
"Microsol" "Rhino 20.0" "20000VA" "rhino"
|
|
||||||
|
|
||||||
"Mustek" "Powermust" "400VA Plus" "megatec"
|
|
||||||
"Mustek" "Powermust" "600VA Plus" "megatec"
|
|
||||||
"Mustek" "Powermust" "800VA Pro" "megatec"
|
|
||||||
"Mustek" "Powermust" "1000VA Plus" "megatec"
|
|
||||||
"Mustek" "Powermust" "1400VA Plus" "megatec"
|
|
||||||
"Mustek" "Powermust" "2000VA USB" "megatec"
|
|
||||||
"Mustek" "Powermust Office 650" "USB" "megatec_usb"
|
|
||||||
"Mustek" "PowerMust 424 / 636 / 848" "USB" "blazer_usb"
|
|
||||||
"Mustek" "Various" "" "megatec"
|
|
||||||
|
|
||||||
"Neus" "400va / 600va" "" "megatec"
|
|
||||||
|
|
||||||
"Nitram" "Elite 500" "" "genericups upstype=8"
|
|
||||||
"Nitram" "Elite 2002" "" "genericups upstype=16"
|
|
||||||
"Nitram" "Elite 2005" "" "powerpanel"
|
|
||||||
|
|
||||||
"Oneac" "ON400" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON600" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON900" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON1300" "advanced interface" "oneac"
|
|
||||||
"Oneac" "EG Series" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON700" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON700XAU" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON700XIU" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON1000" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON1000XAU" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON1000XIU" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON1500" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON1500XAU" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON1500XIU" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON2000" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON2000XAU" "advanced interface" "oneac"
|
|
||||||
"Oneac" "ON2000XIU" "advanced interface" "oneac"
|
|
||||||
|
|
||||||
"Online" "P-Series" "" "genericups upstype=14"
|
|
||||||
"Online" "Zinto D" "" "optiups"
|
|
||||||
|
|
||||||
"OnLite" "AQUA" "50" "megatec"
|
|
||||||
|
|
||||||
"Opti-UPS" "PowerES" "420E" "optiups"
|
|
||||||
|
|
||||||
"Orvaldi Power Protection" "various" "not 400 or 600" "megatec"
|
|
||||||
|
|
||||||
"Phasak" "400VA / 600VA" "" "megatec"
|
|
||||||
|
|
||||||
"Plexus" "500VA" "USB" "megatec_usb ignoreoff"
|
|
||||||
"Plexus" "1000VA Pro" "USB" "megatec_usb ignoreoff"
|
|
||||||
|
|
||||||
"Powercom" "SMK" "" "megatec"
|
|
||||||
"Powercom" "SXL" "" "megatec"
|
|
||||||
"Powercom" "ULT" "" "megatec"
|
|
||||||
"Powercom" "Trust 425/625" "" "powercom"
|
|
||||||
"Powercom" "Advice Partner/King Pr750" "" "powercom"
|
|
||||||
"Powercom" "Black Knight PRO" "" "powercom"
|
|
||||||
"Powercom" "Black Knight PRO" "USB (2009 models, product id: 00a6)" "usbhid-ups (experimental)"
|
|
||||||
"Powercom" "Smart KING Pro (all Smart series)" "powercom"
|
|
||||||
"Powercom" "Smart KING Pro (all Smart series)" "USB (2009 models, product id: 00a3)" "usbhid-ups (experimental)"
|
|
||||||
"Powercom" "Imperial" "" "powercom"
|
|
||||||
"Powercom" "Imperial" "USB (2009 models, product id: 00a2)" "usbhid-ups (experimental)"
|
|
||||||
"Powercom" "Vanguard" "" "megatec"
|
|
||||||
"Powercom" "Vanguard" "USB (2009 models, product id: 00a5)" "usbhid-ups (experimental)"
|
|
||||||
"Powercom" "WOW" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)"
|
|
||||||
"Powercom" "WOW" "USB (2009 models, product id: 00a4)" "usbhid-ups (experimental)"
|
|
||||||
"Powercom" "(various)" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)"
|
|
||||||
"Powercom" "(various)" "USB (2009 models, product id: 00a?)" "usbhid-ups (experimental)"
|
|
||||||
|
|
||||||
"PowerGuard" "PG-600" "" "megatec"
|
|
||||||
|
|
||||||
"PowerKinetics" "9001" "" "genericups upstype=17"
|
|
||||||
"PowerKinetics" "BlackOut Buster" "" "megatec"
|
|
||||||
|
|
||||||
"PowerMan" "RealSmart 800" "" "megatec"
|
|
||||||
"PowerMan" "RealSmart 1000" "" "megatec"
|
|
||||||
"PowerMan" "BackPro" "" "genericups upstype=4"
|
|
||||||
|
|
||||||
"PowerTech" "Comp1000" "DTR cable power" "genericups upstype=3"
|
|
||||||
"PowerTech" "SMK-800" "" "megatec"
|
|
||||||
|
|
||||||
"PowerWalker" "Line-Interactive VI 1000" "" "megatec"
|
|
||||||
"PowerWalker" "Line-Interactive VI 400/800" "" "megatec"
|
|
||||||
"PowerWalker" "Line-Interactive VI 600" "" "megatec battvolts=9:13"
|
|
||||||
|
|
||||||
"Powerware" "3110" "" "genericups upstype=7"
|
|
||||||
"Powerware" "3115" "" "genericups upstype=11"
|
|
||||||
"Powerware" "5119, 5125" "" "genericups upstype=15"
|
|
||||||
"Powerware" "5119 RM" "" "genericups upstype=20"
|
|
||||||
"Powerware" "PW3105" "" "bcmxcp_usb"
|
|
||||||
"Powerware" "PW5110" "" "bcmxcp_usb"
|
|
||||||
"Powerware" "PW5115" "Serial port" "bcmxcp"
|
|
||||||
"Powerware" "PW5115" "USB port" "bcmxcp_usb"
|
|
||||||
"Powerware" "PW5125" "" "bcmxcp"
|
|
||||||
"Powerware" "PW9120" "Serial port" "bcmxcp"
|
|
||||||
"Powerware" "PW9120" "USB port" "bcmxcp_usb"
|
|
||||||
"Powerware" "PW9125" "" "bcmxcp"
|
|
||||||
"Powerware" "PW9315" "3-phase" "bcmxcp"
|
|
||||||
"Powerware" "9110" "" "upscode2"
|
|
||||||
"Powerware" "9120" "" "upscode2"
|
|
||||||
"Powerware" "9150" "" "upscode2"
|
|
||||||
"Powerware" "9305" "" "upscode2"
|
|
||||||
"Powerware" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)"
|
|
||||||
"Powerware" "(various)" "ConnectUPS Web/SNMP card" "snmp-ups (experimental)"
|
|
||||||
|
|
||||||
"Powerwell" "PM525A/-625A/-800A/-1000A/-1250A" "" "safenet"
|
|
||||||
|
|
||||||
"Phantom" "Rackable Systems" "1 outlets" "powerman-pdu (experimental)"
|
|
||||||
|
|
||||||
"Raritan" "Intelligent PDU - Dominion PX" "no report, but should be supported" "snmp-ups (experimental)"
|
|
||||||
"Raritan" "Metered PDU - Raritan PM" "no report, but should be supported" "snmp-ups (experimental)"
|
|
||||||
"Raritan" "Switched PDU - Raritan RPC" "no report, but should be supported" "snmp-ups (experimental)"
|
|
||||||
|
|
||||||
"Repotec" "RPF525/625/800/1000" "" "safenet"
|
|
||||||
"Repotec" "RPT-800A" "" "genericups upstype=13"
|
|
||||||
"Repotec" "RPT-162A" "" "genericups upstype=13"
|
|
||||||
|
|
||||||
"SmartLabs" "2412S Power Line Modem" "for X10/Insteon" "powerman-pdu (experimental)"
|
|
||||||
|
|
||||||
"SMS (Brazil)" "Manager III" "" "megatec"
|
|
||||||
|
|
||||||
"SOLA" "305" "cable INT-0025C" "genericups upstype=7"
|
|
||||||
"SOLA" "325" "" "bestups"
|
|
||||||
"SOLA" "520" "" "bestups"
|
|
||||||
"SOLA" "610" "use ID= in ups.conf" "bestups"
|
|
||||||
"SOLA" "620" "" "bestups"
|
|
||||||
"SOLA" "330" "" "megatec"
|
|
||||||
|
|
||||||
"SOLA/BASIC Mexico" "various" "ISBMEX protocol" "isbmex"
|
|
||||||
|
|
||||||
"Socomec" "NeTYS-PE 600VA" "megatec"
|
|
||||||
"Socomec Sicon" "Egys" "420 VA" "powercom"
|
|
||||||
"Socomec Sicon" "Netvision" "UPS equipped with Netvision WEB/SNMP card/external box" "snmp-ups (experimental)"
|
|
||||||
|
|
||||||
"Soltec" "Winmate 525/625/800/1000" "" "safenet"
|
|
||||||
|
|
||||||
"Soyntec" "Sekury C 500" "" "megatec"
|
|
||||||
"Soyntec" "Sekury C 800" "" "megatec"
|
|
||||||
|
|
||||||
"SquareOne Power" "QP1000" "" "megatec"
|
|
||||||
|
|
||||||
"Sun" "ILOM Management Module" "1 outlet" "powerman-pdu (experimental)"
|
|
||||||
|
|
||||||
"SuperPower" "HP360, Hope-550" "" "megatec"
|
|
||||||
|
|
||||||
"SVEN" "Power Pro+ series" "USB" "megatec_usb"
|
|
||||||
"SVEN" "Power Smart RM 2000" "USB" "megatec_usb"
|
|
||||||
|
|
||||||
"Sweex" "500/1000" "smart - shipped with SafeNet" "safenet"
|
|
||||||
"Sweex" "500/1000" "" "genericups upstype=7"
|
|
||||||
"Sweex" "1000" "USB" "richcomm_usb"
|
|
||||||
"Sweex" "(various)" "" "megatec"
|
|
||||||
|
|
||||||
"Sysgration" "UPGUARDS Pro650" "" "megatec"
|
|
||||||
|
|
||||||
"Tecnoware" "Easy Power 1200" "" "megatec"
|
|
||||||
|
|
||||||
"Tripp-Lite" "INTERNETOFFICE700" "USB" "tripplite_usb"
|
|
||||||
"Tripp-Lite" "OMNIVS1000" "USB" "tripplite_usb"
|
|
||||||
"Tripp-Lite" "OMNIVS1500XL" "USB" "tripplite_usb"
|
|
||||||
"Tripp-Lite" "SMART700USB" "USB" "tripplite_usb"
|
|
||||||
"Tripp-Lite" "SMART1500RM2U" "USB" "tripplite_usb"
|
|
||||||
"Tripp-Lite" "SMART550USB" "USB" "tripplite_usb"
|
|
||||||
"Tripp-Lite" "SMART2200RMXL2U" "USB, older models" "tripplite_usb (experimental)"
|
|
||||||
"Tripp-Lite" "SmartUPS" "" "tripplite"
|
|
||||||
"Tripp-Lite" "SmartOnline" "" "tripplitesu"
|
|
||||||
"Tripp-Lite" "(various)" "Lan 2.2 interface - black 73-0844 cable" "genericups upstype=5"
|
|
||||||
"Tripp-Lite" "OMNI1000LCD" "USB" "usbhid-ups"
|
|
||||||
"Tripp-Lite" "OMNI900LCD" "USB" "usbhid-ups"
|
|
||||||
"Tripp-Lite" "OMNI650LCD" "USB" "usbhid-ups"
|
|
||||||
"Tripp-Lite" "1500 LCD" "USB" "usbhid-ups"
|
|
||||||
"Tripp-Lite" "AVR550U" "USB" "usbhid-ups"
|
|
||||||
"Tripp-Lite" "AVR750U" "USB" "usbhid-ups"
|
|
||||||
"Tripp-Lite" "ECO550UPS" "USB" "usbhid-ups"
|
|
||||||
"Tripp-Lite" "SmartOnline SU1500RTXL2ua" "USB" "usbhid-ups"
|
|
||||||
"Tripp-Lite" "smart2200RMXL2U" "USB, newer models" "usbhid-ups"
|
|
||||||
|
|
||||||
"Trust" "UPS 1000 Management PW-4105" "" "megatec"
|
|
||||||
"Trust" "UPS 1200VA Management PW-4120M" "" "megatec"
|
|
||||||
"Trust" "UPS 1300VA Management PW-4130M" "" "megatec"
|
|
||||||
|
|
||||||
"UNITEK" "ALPHA 500 IC" "" "megatec dtr=0 rts=1"
|
|
||||||
"UNITEK" "Alpha 1000is" "" "megatec"
|
|
||||||
"UNITEK" "Alpha 500" "" "megatec"
|
|
||||||
"UNITEK" "Alpha 500 ipE" "" "megatec"
|
|
||||||
"UNITEK" "Alpha 2600" "" "megatec"
|
|
||||||
"UNITEK" "Alpha 1200Sx" "USB" "megatec_usb"
|
|
||||||
"UNITEK" "Alpha 1250xD" "USB" "megatec_usb"
|
|
||||||
|
|
||||||
"UPSonic" "CXR1000" "" "megatec"
|
|
||||||
"UPSonic" "LAN Saver 600" "" "genericups upstype=0"
|
|
||||||
"UPSonic" "Power Guardian" "" "genericups upstype=7"
|
|
||||||
"UPSonic" "PrOffice 650" "USB" "megatec_usb"
|
|
||||||
"UPSonic" "DS-800" "USB" "megatec_usb"
|
|
||||||
|
|
||||||
"Various" "(various)" "SEC protocol" "gamatronic"
|
|
||||||
"Various" "(various)" "Generic RUPS model" "genericups upstype=4"
|
|
||||||
"Various" "(various)" "Generic RUPS 2000 (Megatec M2501 cable)" "genericups upstype=21"
|
|
||||||
"Various" "(various)" "Q1 / Megatec protocol" "megatec"
|
|
||||||
"Various" "(various)" "PhoenixTec protocol" "bestups"
|
|
||||||
"Various" "(various)" "SNMP - RFC 1628" "snmp-ups (experimental)"
|
|
||||||
"Various" "(various)" "Safenet software" "safenet"
|
|
||||||
|
|
||||||
"Victron/IMV" "(various)" "" "victronups"
|
|
||||||
"Victron/IMV" "Lite" "crack cable" "genericups upstype=10"
|
|
||||||
|
|
||||||
"Viewsonic" "PowerES" "420E" "optiups"
|
|
||||||
|
|
||||||
"WinPower" "CPM-800" "" "megatec"
|
|
||||||
|
|
||||||
"WTI" "RPS-10" "10 outlets" "powerman-pdu (experimental)"
|
|
||||||
"WTI" "NPS" "8 outlets" "powerman-pdu (experimental)"
|
|
761
data/driver.list.in
Normal file
|
@ -0,0 +1,761 @@
|
||||||
|
# Network UPS Tools - @PACKAGE_VERSION@ - Hardware Compatibility List
|
||||||
|
# version=2
|
||||||
|
#
|
||||||
|
# This file is used for various purposes, like building the HTML compatibility
|
||||||
|
# list or displaying information in NUT configuration tools.
|
||||||
|
#
|
||||||
|
# If you write a new driver, modify an existing one to add more support,
|
||||||
|
# or just know about some equipment that isn't listed but should be,
|
||||||
|
# please send us a patch to update this file.
|
||||||
|
#
|
||||||
|
# Format:
|
||||||
|
# =======
|
||||||
|
# <manufacturer> <device type> <support level> <model name> <model extra> <driver [parameters]>
|
||||||
|
#
|
||||||
|
# Details:
|
||||||
|
# ========
|
||||||
|
# - device type:
|
||||||
|
# "ups" for Uninterruptible Power Supply
|
||||||
|
# "pdu" for Power Distributions Unit
|
||||||
|
# "scd" for Solar Controlers Device
|
||||||
|
#
|
||||||
|
# - support level: a number from "1" to "5" (stars) meaning:
|
||||||
|
# * protocol based on reverse engineering
|
||||||
|
# ** based on fragments of publicly available protocol
|
||||||
|
# *** based on publicly available protocol
|
||||||
|
# **** vendor provided protocol
|
||||||
|
# ***** vendor provided protocol and hardware
|
||||||
|
#
|
||||||
|
# - driver [parameters]: mention the driver(s) (separated by "or" if there are
|
||||||
|
# several possibilities. Any mandatory parameter(s) must be referenced, as
|
||||||
|
# they will be parsed by configuration helper softwares.
|
||||||
|
# For example, genericups entries must mention the "upstype=nn" format.
|
||||||
|
#
|
||||||
|
# Duplicate text in the last field will be cooked out during the conversion
|
||||||
|
# to HTML with ROWSPAN magic. They must be an exact match for this to work.
|
||||||
|
|
||||||
|
"Ablerex" "ups" "2" "MS-RT" "" "blazer_ser"
|
||||||
|
"Ablerex" "ups" "2" "625L" "USB" "blazer_usb"
|
||||||
|
"Ablerex" "ups" "2" "Hope Office 400/600" "" "blazer_ser"
|
||||||
|
|
||||||
|
"ActivePower" "ups" "2" "400VA" "" "blazer_ser"
|
||||||
|
"ActivePower" "ups" "2" "1400VA" "" "blazer_ser"
|
||||||
|
"ActivePower" "ups" "2" "2000VA" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Advice" "ups" "2" "TopGuard 2000" "" "blazer_ser"
|
||||||
|
|
||||||
|
"AEC" "ups" "1" "MiniGuard UPS 700" "Megatec M2501 cable" "genericups upstype=21"
|
||||||
|
|
||||||
|
"APC" "ups" "1" "Back-UPS Pro" "" "apcsmart"
|
||||||
|
"APC" "ups" "1" "Matrix-UPS" "" "apcsmart"
|
||||||
|
"APC" "ups" "1" "Smart-UPS" "" "apcsmart"
|
||||||
|
"APC" "ups" "2" "Back-UPS Pro USB" "USB" "usbhid-ups"
|
||||||
|
"APC" "ups" "2" "Back-UPS USB" "USB" "usbhid-ups"
|
||||||
|
"APC" "ups" "2" "Back-UPS RS USB" "USB" "usbhid-ups"
|
||||||
|
"APC" "ups" "2" "Back-UPS LS USB" "USB" "usbhid-ups"
|
||||||
|
"APC" "ups" "2" "Back-UPS ES/CyberFort 350" "USB" "usbhid-ups"
|
||||||
|
"APC" "ups" "2" "Back-UPS BF500" "USB" "usbhid-ups"
|
||||||
|
"APC" "ups" "2" "BACK-UPS XS LCD" "USB" "usbhid-ups"
|
||||||
|
"APC" "ups" "2" "Smart-UPS USB" "USB" "usbhid-ups"
|
||||||
|
"APC" "ups" "1" "Back-UPS" "940-0095A/C cables" "genericups upstype=1"
|
||||||
|
"APC" "ups" "1" "Back-UPS" "940-0020B/C cables" "genericups upstype=2"
|
||||||
|
"APC" "ups" "1" "Back-UPS" "940-0023A cable" "genericups upstype=9"
|
||||||
|
"APC" "ups" "1" "Back-UPS Office" "940-0119A cable" "genericups upstype=12"
|
||||||
|
"APC" "ups" "1" "Back-UPS RS 500" "custom non-USB cable" "genericups upstype=20"
|
||||||
|
"APC" "pdu" "1" "Masterswitch" "940-0020 cable" "genericups upstype=12"
|
||||||
|
"APC" "pdu" "1" "AP9210" "8 outlets" "powerman-pdu (experimental)"
|
||||||
|
"APC" "pdu" "1" "AP79xx" "8 to 24 outlets" "powerman-pdu (experimental)"
|
||||||
|
"APC" "pdu" "3" "(various)" "SNMP monitoring card" "snmp-ups (experimental)"
|
||||||
|
|
||||||
|
"Aphel" "pdu" "3" "various PDU" "" "snmp-ups (experimental)"
|
||||||
|
|
||||||
|
"Apollo" "ups" "1" "1000A" "" "genericups upstype=4"
|
||||||
|
"Apollo" "ups" "1" "1000F" "" "genericups upstype=4"
|
||||||
|
|
||||||
|
"Appro" "pdu" "1" "SWPDU" "48 outlets" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
|
"Atlantis Land" "ups" "2" "A03-P826" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Baytech" "pdu" "1" "RPC3" "8 outlets" "powerman-pdu (experimental)"
|
||||||
|
"Baytech" "pdu" "1" "RPC3-20NC" "8 outlets" "powerman-pdu (experimental)"
|
||||||
|
"Baytech" "pdu" "1" "RPC28-30NC" "20 outlets" "powerman-pdu (experimental)"
|
||||||
|
"Baytech" "pdu" "3" "various RPC" "" "snmp-ups"
|
||||||
|
|
||||||
|
"Belkin" "ups" "2" "Active Battery Backup BU30 series" "USB" "blazer_usb"
|
||||||
|
"Belkin" "ups" "1" "Home Office F6H350-SER" "" "genericups upstype=7"
|
||||||
|
"Belkin" "ups" "1" "Home Office F6H500-SER" "" "genericups upstype=7"
|
||||||
|
"Belkin" "ups" "1" "Home Office F6H650-SER" "" "genericups upstype=7"
|
||||||
|
"Belkin" "ups" "2" "F6H375-USB" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups"
|
||||||
|
"Belkin" "ups" "2" "F6H375-USB" "USB (2007 models, vendor id: 0665)" "blazer_usb"
|
||||||
|
"Belkin" "ups" "2" "Office Series F6C550-AVR" "USB" "usbhid-ups"
|
||||||
|
"Belkin" "ups" "2" "Regulator Pro" "F6C525-SER, F6C625-SER" "belkin"
|
||||||
|
"Belkin" "ups" "1" "Resource" "" "genericups upstype=4"
|
||||||
|
"Belkin" "ups" "2" "Small Enterprise F6C1500-TW-RK" "serial port" "belkin"
|
||||||
|
"Belkin" "ups" "2" "Small Enterprise F6C1500-TW-RK" "USB" "usbhid-ups"
|
||||||
|
"Belkin" "ups" "2" "Universal UPS F6C100-UNV" "USB" "usbhid-ups"
|
||||||
|
"Belkin" "ups" "1" "Universal UPS F6C120-UNV" "serial port" "belkinunv"
|
||||||
|
"Belkin" "ups" "2" "Universal UPS F6C120-UNV" "USB" "usbhid-ups"
|
||||||
|
"Belkin" "ups" "1" "Universal UPS F6C800-UNV" "serial port" "belkinunv"
|
||||||
|
"Belkin" "ups" "2" "Universal UPS F6C800-UNV" "USB" "usbhid-ups"
|
||||||
|
"Belkin" "ups" "1" "Universal UPS F6C1100-UNV" "serial port (<= 2005 models)" "belkinunv"
|
||||||
|
"Belkin" "ups" "2" "Universal UPS F6C1100-UNV" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups"
|
||||||
|
"Belkin" "ups" "2" "Universal UPS F6C1100-UNV" "USB (2007 models, vendor id: 0665)" "blazer_usb"
|
||||||
|
"Belkin" "ups" "2" "Universal UPS F6C1200-UNV" "USB (<= 2005 models, vendor id: 050d)" "usbhid-ups"
|
||||||
|
"Belkin" "ups" "2" "Universal UPS F6C1200-UNV" "USB (2007 models, vendor id: 0665)" "blazer_usb"
|
||||||
|
"Belkin" "ups" "2" "Universal UPS F6H350deUNV" "serial port" "blazer_ser"
|
||||||
|
"Belkin" "ups" "2" "Universal UPS F6H350ukUNV" "serial port" "blazer_ser"
|
||||||
|
"Belkin" "ups" "2" "Universal UPS F6H500ukUNV" "serial port" "blazer_ser"
|
||||||
|
"Belkin" "ups" "2" "Universal UPS F6H650ukUNV" "serial port" "blazer_ser"
|
||||||
|
|
||||||
|
"Best Power" "ups" "1" "Fortress (older)" "" "bestfortress"
|
||||||
|
"Best Power" "ups" "1" "Fortress (newer)" "" "bestups"
|
||||||
|
"Best Power" "ups" "1" "Fortress Telecom" "" "bestups"
|
||||||
|
"Best Power" "ups" "1" "Axxium Rackmount" "" "bestups"
|
||||||
|
"Best Power" "ups" "1" "Patriot Pro" "" "bestups"
|
||||||
|
"Best Power" "ups" "1" "Patriot Pro II" "" "bestups"
|
||||||
|
"Best Power" "ups" "1" "Patriot" "INT51 cable" "genericups upstype=6"
|
||||||
|
"Best Power" "ups" "1" "Micro-Ferrups" "" "bestuferrups"
|
||||||
|
"Best Power" "ups" "1" "Fortress/Ferrups" "f-command support" "bestfcom"
|
||||||
|
|
||||||
|
"Chloride" "ups" "2" "Desk Power 650" "serial port" "blazer_ser"
|
||||||
|
|
||||||
|
"Cito Power" "ups" "2" "CPG-SR1000" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Clary" "ups" "4" "ST-800" "" "gamatronic"
|
||||||
|
|
||||||
|
"Compaq" "ups" "4" "T1500h" "" "upscode2 use_pre_lf"
|
||||||
|
"Compaq" "ups" "4" "R3000h" "" "upscode2"
|
||||||
|
"Compaq" "ups" "4" "R3000 XR" "" "bcmxcp"
|
||||||
|
"Compaq" "ups" "4" "R5500 XR" "" "bcmxcp"
|
||||||
|
|
||||||
|
"Cyber Power Systems" "ups" "1" "320AVR" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "500AVR" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "650AVR" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "700AVR" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "800AVR" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "850AVR" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "900AVR" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "1250AVR" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "1500AVR" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "Power99" "" "genericups upstype=7"
|
||||||
|
"Cyber Power Systems" "ups" "1" "550SL" "" "genericups upstype=7"
|
||||||
|
"Cyber Power Systems" "ups" "1" "725SL" "" "genericups upstype=7"
|
||||||
|
"Cyber Power Systems" "ups" "1" "CPS825VA" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "1100AVR" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "1200AVR" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "1500AVR-HO" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "1" "PR2200" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "2" "PR3000E" "" "powerpanel"
|
||||||
|
"Cyber Power Systems" "ups" "2" "685AVR" "USB" "usbhid-ups"
|
||||||
|
"Cyber Power Systems" "ups" "2" "800AVR" "USB" "usbhid-ups"
|
||||||
|
"Cyber Power Systems" "ups" "2" "AE550" "USB" "usbhid-ups"
|
||||||
|
"Cyber Power Systems" "ups" "3" "CP 1500C" "USB" "usbhid-ups"
|
||||||
|
"Cyber Power Systems" "ups" "3" "OR2200LCDRM2U" "USB" "usbhid-ups"
|
||||||
|
"Cyber Power Systems" "ups" "2" "Value 400E" "USB" "usbhid-ups"
|
||||||
|
"Cyber Power Systems" "ups" "2" "Value 600E" "USB" "usbhid-ups"
|
||||||
|
"Cyber Power Systems" "ups" "2" "Value 800E" "USB" "usbhid-ups"
|
||||||
|
"Cyber Power Systems" "ups" "2" "CP1350AVRLCD" "USB" "usbhid-ups"
|
||||||
|
"Cyber Power Systems" "ups" "2" "CP1500AVRLCD" "USB" "usbhid-ups"
|
||||||
|
|
||||||
|
"Cyclades" "pdu" "1" "PM8" "8 outlets" "powerman-pdu (experimental)"
|
||||||
|
"Cyclades" "pdu" "1" "PM10" "10 outlets" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
|
"Dell" "ups" "5" "Tower 500W LV / HV" "USB port" "usbhid-ups"
|
||||||
|
"Dell" "ups" "5" "Tower 500W LV / HV" "Serial port" "newmge-shut"
|
||||||
|
"Dell" "ups" "5" "Rack/Tower 1000W LV / HV" "USB port" "usbhid-ups"
|
||||||
|
"Dell" "ups" "5" "Rack/Tower 1000W LV / HV" "Serial port" "newmge-shut"
|
||||||
|
"Dell" "ups" "5" "Rack/Tower 1500W LV" "USB port" "usbhid-ups"
|
||||||
|
"Dell" "ups" "5" "Rack/Tower 1500W LV" "Serial port" "newmge-shut"
|
||||||
|
"Dell" "ups" "5" "Rack/Tower 1920W LV / HV" "USB port" "usbhid-ups"
|
||||||
|
"Dell" "ups" "5" "Rack/Tower 1920W LV / HV" "Serial port" "newmge-shut"
|
||||||
|
"Dell" "ups" "5" "Rack/Tower 2300W LV" "USB port" "usbhid-ups"
|
||||||
|
"Dell" "ups" "5" "Rack/Tower 2300W LV" "Serial port" "newmge-shut"
|
||||||
|
"Dell" "ups" "5" "Rack/Tower 2700W LV / HV" "USB port" "usbhid-ups"
|
||||||
|
"Dell" "ups" "5" "Rack/Tower 2700W LV / HV" "Serial port" "newmge-shut"
|
||||||
|
"Dell" "ups" "5" "Short Depth Rack 2700W Online LV / HV" "High Efficiency, USB port" "usbhid-ups"
|
||||||
|
"Dell" "ups" "5" "Short Depth Rack 2700W Online LV / HV" "High Efficiency, Serial port" "newmge-shut"
|
||||||
|
"Dell" "ups" "5" "Rack 3750W High Efficiency Online HV" "USB port" "usbhid-ups"
|
||||||
|
"Dell" "ups" "5" "Rack 3750W High Efficiency Online HV" "Serial port" "newmge-shut"
|
||||||
|
"Dell" "ups" "5" "Rack 4200W High Efficiency Online HV" "USB port" "usbhid-ups"
|
||||||
|
"Dell" "ups" "5" "Rack 4200W High Efficiency Online HV" "Serial port" "newmge-shut"
|
||||||
|
"Dell" "ups" "5" "Rack 5600W HV" "USB port" "usbhid-ups"
|
||||||
|
"Dell" "ups" "5" "Rack 5600W HV" "Serial port" "newmge-shut"
|
||||||
|
|
||||||
|
"Delta" "ups" "1" "GES602N" "" "belkin"
|
||||||
|
|
||||||
|
"Deltec" "ups" "1" "PowerRite Pro II" "" "genericups upstype=15"
|
||||||
|
|
||||||
|
"Digital Loggers" "pdu" "1" "LPC, EPCR2, DIN" "8 outlets" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
|
"Digitus" "ups" "2" "DN-170020" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Dynamix" "ups" "2" "UPS1700D" "" "blazer_ser"
|
||||||
|
"Dynamix" "ups" "2" "UPS-650VA" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Dynex" "ups" "1" "975AVR" "" "genericups upstype=7"
|
||||||
|
"Dynex" "ups" "2" "DX-800U" "USB" "usbhid-ups"
|
||||||
|
|
||||||
|
"Eaton" "ups" "5" "Protection Station 500/650/800 VA" "USB" "usbhid-ups"
|
||||||
|
"Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups"
|
||||||
|
"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups"
|
||||||
|
"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups"
|
||||||
|
"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups"
|
||||||
|
"Eaton" "ups" "5" "EX 700/1000/1500 VA" "USB port" "usbhid-ups"
|
||||||
|
"Eaton" "ups" "5" "EX 2200/3000/3000 XL VA" "USB port" "usbhid-ups"
|
||||||
|
"Eaton" "ups" "5" "EX 1000 RT2U / 1500 RT2U" "USB port" "usbhid-ups"
|
||||||
|
"Eaton" "ups" "5" "MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups"
|
||||||
|
"Eaton" "ups" "5" "Nova AVR 625/1250" "USB" "usbhid-ups"
|
||||||
|
"Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"Eaton" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"Eaton" "ups" "5" "EX 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"Eaton" "ups" "5" "EX 2200/3000/3000 XL VA" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"Eaton" "ups" "5" "EX 1000 RT2U / 1500 RT2U" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"Eaton" "ups" "5" "MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"Eaton" "ups" "5" "EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut"
|
||||||
|
"Eaton" "ups" "5" "EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut"
|
||||||
|
"Eaton" "ups" "5" "EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)"
|
||||||
|
"Eaton" "ups" "5" "EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)"
|
||||||
|
"Eaton" "ups" "5" "E Series NV UPS 400-2000 VA" "" "blazer_usb"
|
||||||
|
"Eaton" "ups" "5" "E Series DX UPS 1-20 kVA" "" "mge-utalk"
|
||||||
|
"Eaton" "ups" "5" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)"
|
||||||
|
"Eaton" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)"
|
||||||
|
"Eaton" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)"
|
||||||
|
"Eaton" "ups" "5" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)"
|
||||||
|
"Eaton" "ups" "5" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)"
|
||||||
|
"Eaton" "pdu" "5" "ePDU Managed" "" "snmp-ups (experimental)"
|
||||||
|
"Eaton" "pdu" "5" "ePDU Monitored" "" "snmp-ups or netxml-ups"
|
||||||
|
"Eaton" "ups" "5" "Powerware 9130" "" "bcmxcp or usbhid-ups"
|
||||||
|
"Eaton" "ups" "5" "Powerware 5130" "" "usbhid-ups"
|
||||||
|
"Eaton" "ups" "5" "9395" "Serial port" "bcmxcp"
|
||||||
|
"Eaton" "ups" "5" "Best Ferrups" "older ConnectUPS" "snmp-ups"
|
||||||
|
"Eaton" "ups" "5" "ConnectUPS X / BD / E Slot" "Serial Pass-through mode" "bcmxcp"
|
||||||
|
"Eaton" "ups" "5" "ConnectUPS X / BD / E Slot" "Network port" "snmp-ups"
|
||||||
|
|
||||||
|
"Effekta" "ups" "2" "MI/MT/MH" "2502 cable" "blazer_ser"
|
||||||
|
"Effekta" "ups" "2" "RM2000MH" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Energy Sistem" "ups" "2" "(various)" "" "blazer_ser"
|
||||||
|
|
||||||
|
"ETA" "ups" "1" "mini+UPS" "WinNT/Upsoft cable" "genericups upstype=7"
|
||||||
|
"ETA" "ups" "1" "mini+UPS PRO" "UPS Explorer cable" "etapro"
|
||||||
|
|
||||||
|
"Ever UPS" "ups" "1" "NET *-DPC" "" "everups"
|
||||||
|
"Ever UPS" "ups" "1" "AP *-PRO" "" "everups"
|
||||||
|
|
||||||
|
"Ever-Power" "ups" "1" "625/1000" "" "safenet"
|
||||||
|
|
||||||
|
"Exide" "ups" "1" "NetUPS SE" "" "genericups upstype=15"
|
||||||
|
|
||||||
|
"Fenton Technologies" "ups" "1" "PowerPal" "P-series" "safenet"
|
||||||
|
"Fenton Technologies" "ups" "5" "PowerPal" "L-series" "blazer_ser"
|
||||||
|
"Fenton Technologies" "ups" "5" "PowerOn" "" "blazer_ser"
|
||||||
|
"Fenton Technologies" "ups" "5" "PowerPure" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Fairstone" "ups" "1" "L525/L625/L750" "" "safenet"
|
||||||
|
|
||||||
|
"Fideltronik" "ups" "1" "Ares 700 and larger" "" "genericups upstype=6"
|
||||||
|
"Fideltronik" "ups" "1" "Other Ares models" "" "genericups upstype=19"
|
||||||
|
|
||||||
|
"Fiskars" "ups" "4" "PowerRite MAX" "" "upscode2"
|
||||||
|
"Fiskars" "ups" "4" "PowerServer 10" "" "upscode2"
|
||||||
|
"Fiskars" "ups" "4" "PowerServer 30" "" "upscode2"
|
||||||
|
"Fiskars" "ups" "4" "9200" "UPS Information Unit" "upscode2"
|
||||||
|
|
||||||
|
"Forza Power Technologies" "ups" "2" "SL-1001" "USB" "blazer_usb"
|
||||||
|
|
||||||
|
"FSP" "ups" "2" "EP650" "USB" "blazer_usb"
|
||||||
|
|
||||||
|
"Gamatronic" "ups" "5" "All models with alarm interface" "" "genericups upstype=22"
|
||||||
|
"Gamatronic" "ups" "2" "G-SmartCompact 2000" "" "blazer_ser"
|
||||||
|
"Gamatronic" "ups" "5" "MP110/210" "" "gamatronic"
|
||||||
|
"Gamatronic" "ups" "5" "MS-T" "" "gamatronic"
|
||||||
|
"Gamatronic" "ups" "5" "MS" "" "gamatronic"
|
||||||
|
"Gamatronic" "ups" "5" "µPS3/1" "" "gamatronic"
|
||||||
|
|
||||||
|
"Geek Squad" "ups" "2" "GS1285U" "USB" "usbhid-ups"
|
||||||
|
|
||||||
|
"Gemini" "ups" "1" "UPS625/UPS1000" "" "safenet"
|
||||||
|
|
||||||
|
"HP" "ups" "1" "PowerTrust 2997A" "HP 5061-2575 cable" "apcsmart"
|
||||||
|
"HP" "ups" "4" "R3000 XR" "" "bcmxcp"
|
||||||
|
"HP" "ups" "4" "R5500 XR" "" "bcmxcp"
|
||||||
|
"HP" "ups" "2" "R1500 G2" "" "bcmxcp"
|
||||||
|
"HP" "ups" "2" "R/T 2200 G2" "" "usbhid-ups"
|
||||||
|
"HP" "ups" "2" "T500" "older models" "bcmxcp_usb"
|
||||||
|
"HP" "ups" "2" "T750 INTL" "" "usbhid-ups"
|
||||||
|
"HP" "ups" "2" "T750" "older models" "bcmxcp_usb"
|
||||||
|
"HP" "ups" "2" "T1000 INTL" "" "usbhid-ups"
|
||||||
|
"HP" "ups" "2" "T1500 INTL" "" "usbhid-ups"
|
||||||
|
"HP" "ups" "2" "T750 G2" "" "usbhid-ups"
|
||||||
|
"HP" "ups" "2" "R1500 G2 INTL" "" "usbhid-ups"
|
||||||
|
"HP" "pdu" "1" "HP3488 Switch/Control Unit" "" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
|
"IBM" "pdu" "1" "Blade Center Management Module" "15 outlets" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
|
"ICS" "pdu" "1" "8064 Ethernet Relay Interface" "16 outlets" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
|
"iDowell" "ups" "2" "iBox UPS" "" "usbhid-ups"
|
||||||
|
|
||||||
|
"INELT" "ups" "2" "Monolith 1000LT" "" "blazer_ser"
|
||||||
|
"INELT" "ups" "2" "Monolith 3000RT" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Inform" "ups" "1" "GUARD" "Line Interactive AP model" "powercom"
|
||||||
|
"Inform" "ups" "2" "Guard S 1500AP" "" "blazer_ser"
|
||||||
|
"Inform" "ups" "2" "Informer Compact 1000VA" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Infosec" "ups" "2" "iPEL 350" "" "blazer_ser"
|
||||||
|
"Infosec" "ups" "2" "iPEL 500" "" "blazer_ser"
|
||||||
|
"Infosec" "ups" "2" "iPEL 750" "" "blazer_ser"
|
||||||
|
"Infosec" "ups" "2" "iPEL 1000" "" "blazer_ser"
|
||||||
|
"Infosec" "ups" "2" "500XP" "" "blazer_ser"
|
||||||
|
"Infosec" "ups" "2" "XP 500" "USB" "blazer_usb"
|
||||||
|
"Infosec" "ups" "2" "XP 1000" "" "blazer_ser"
|
||||||
|
|
||||||
|
"IPMI" "pdu" "1" "" "" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
|
"Ippon" "ups" "2" "Back Power Pro 400/500/600/700/800" "" "blazer_ser"
|
||||||
|
"Ippon" "ups" "2" "Back Power Pro 400/500/600/700/800" "USB" "blazer_usb (experimental)"
|
||||||
|
"Ippon" "ups" "2" "Back Comfo Pro 600/800" "" "blazer_ser"
|
||||||
|
"Ippon" "ups" "2" "Back Comfo Pro 600/800" "USB" "blazer_usb (experimental)"
|
||||||
|
"Ippon" "ups" "2" "Smart Power Pro 1000/1400/2000" "" "blazer_ser"
|
||||||
|
"Ippon" "ups" "2" "Smart Power Pro 1000/1400/2000" "USB" "blazer_usb (experimental)"
|
||||||
|
"Ippon" "ups" "2" "Smart Winner 750/1000/1500/2000/3000" "" "blazer_ser"
|
||||||
|
"Ippon" "ups" "2" "Smart Winner 750/1000/1500/2000/3000" "USB" "blazer_usb (experimental)"
|
||||||
|
"Ippon" "ups" "2" "(various)" "" "blazer_ser"
|
||||||
|
"Ippon" "ups" "2" "(various)" "USB" "blazer_usb"
|
||||||
|
|
||||||
|
"IVT" "scd" "1" "SCD series" "" "ivtscd"
|
||||||
|
|
||||||
|
"Jageson Technology" "ups" "1" "Jasuny USPS" "" "genericups upstype=4"
|
||||||
|
|
||||||
|
"Kebo" "ups" "2" "1200D/D Series" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Krauler" "ups" "2" "UP-D1200VA" "USB" "blazer_usb"
|
||||||
|
"Krauler" "ups" "2" "UP-M500VA" "USB" "blazer_usb"
|
||||||
|
|
||||||
|
"Lestar" "ups" "2" "MD-800E" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Liebert" "ups" "2" "ITON 600VA" "" "blazer_ser"
|
||||||
|
"Liebert" "ups" "5" "UPStation GXT2" "contact-closure cable" "liebert"
|
||||||
|
"Liebert" "ups" "1" "GXT2-3000RT230" "" "liebert-esp2 (experimental)"
|
||||||
|
"Liebert" "ups" "2" "PowerSure Personal XT" "USB" "usbhid-ups"
|
||||||
|
"Liebert" "ups" "2" "PowerSure PSA" "USB" "usbhid-ups"
|
||||||
|
|
||||||
|
"LNXI" "pdu" "1" "Icebox" "10 outlets" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
|
"Masterguard" "ups" "1" "(various)" "" "masterguard"
|
||||||
|
|
||||||
|
"Maxxtro" "ups" "2" "UPS 600 VA" "serial port" "blazer_ser"
|
||||||
|
|
||||||
|
"Mecer" "ups" "2" "ME-2000" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Meta System" "ups" "1" "HF Line" "1..4 boards" "metasys"
|
||||||
|
"Meta System" "ups" "1" "HF Line \/2" "5..8 boards" "metasys"
|
||||||
|
"Meta System" "ups" "1" "HF Millennium 810" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "HF Millennium 820" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "HF TOP Line 910" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "HF TOP Line 920" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "HF TOP Line 930" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "HF TOP Line 940" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "HF TOP Line 950" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "HF TOP Line 960" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "HF TOP Line 970" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "HF TOP Line 980" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO Network 750" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO Network 1000" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO Network 1050" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO Network 1500" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO Network 1800" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO Network 2000" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO Network 2100" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO Network 2500" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO Network 3000" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO 305" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO 308" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO 311" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO 511" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO 516" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO 519" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ECO 522" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ally HF 800" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ally HF 1000" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ally HF 1250" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ally HF 1600" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ally HF 2000" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "ally HF 2500" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "Megaline 1250" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "Megaline 2500" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "Megaline 3750" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "Megaline 5000" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "Megaline 6250" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "Megaline 7500" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "Megaline 8750" "" "metasys"
|
||||||
|
"Meta System" "ups" "1" "Megaline 10000" "" "metasys"
|
||||||
|
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Protection Center 500/675 VA" "USB" "usbhid-ups"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Protection Station 500/650/800 VA" "USB" "usbhid-ups"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "USB cable" "usbhid-ups"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "USB cable" "usbhid-ups"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "USB port" "usbhid-ups"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "USB port" "usbhid-ups"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "USB port" "usbhid-ups"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "USB port" "usbhid-ups"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Evolution S 1250/1750/2500/3000 VA" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Pulsar 700/1000/1500 VA" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Pulsar M 2200/3000 VA" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Pulsar MX 5/8/10/15/20 kVA" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Comet EX RT 1:1 7/11 kVA" "" "mge-shut or newmge-shut"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Comet EX RT 3:1 5/7/11 kVA" "" "mge-shut or newmge-shut"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Comet EX RT (XML/HTTP)" "NMC Transverse card (ref 66074)" "netxml-ups (experimental)"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "Comet EX RT (SNMP)" "NMC Transverse card (ref 66074)" "snmp-ups (experimental)"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "various models (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)"
|
||||||
|
"MGE Office Protection Systems" "ups" "5" "various models (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)"
|
||||||
|
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT 3:1" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Protection Center 420" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Protection Center 500" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Protection Center 675" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 600 USB" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 1100 USB" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USBS" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USB" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USBS" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USB" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 600" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 750" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1000" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1500" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 600" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 850" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1100" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1500" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Evolution" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 650" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 850" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 1150" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1250" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 1550" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1750" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 2000" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 2500" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 3000" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 2200" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000 XL" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 700" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000 RT2U" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500 RT2U" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "USB" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (USB)" "USB Card (ref 66067)" "usbhid-ups"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 600 Serial" "" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "NOVA AVR 1100 Serial" "" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse USBS" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse S" "" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium USBS" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Ellipse Premium S" "" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 600" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 750" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1000" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse Office 1500" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 600" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 850" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1100" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Ellipse MAX 1500" "Serial cable" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C / EX RT" "" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Comet EX RT 3:1" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Esprit" "" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 650" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 850" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 1150" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1250" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 1550" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 1750" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution 2000" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 2500" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Evolution S 3000" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 2200" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar M 3000 XL" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 700" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1000 RT2U" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar 1500 RT2U" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 4000 RT" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar MX 5000 RT" "Serial port" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar Evolution" "Serial port" "mge-shut or newmge-shut or mge-utalk"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme C" "" "mge-shut or newmge-shut or mge-utalk"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar ES+" "" "mge-utalk"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar ESV+" "" "mge-utalk"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar SV" "" "mge-utalk"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar ESV" "" "mge-utalk"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar EX" "" "mge-utalk"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXL" "" "mge-utalk"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar PSX" "" "mge-utalk"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar SX" "" "mge-utalk"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar EXtreme" "" "mge-utalk"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Comet EXtreme" "" "mge-utalk"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "Utalk Serial Card (ref 66060)" "mge-utalk"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Comet / Galaxy (Serial)" "HID COM Serial Card (ref 66066)" "mge-shut or newmge-shut"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar / Comet / Galaxy (SNMP)" "SNMP/Web Transverse card (ref 66074)" "snmp-ups (experimental)"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "various models (XML/HTTP mode)" "NMC Minislot (Ref 66102)" "netxml-ups (experimental)"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "various models (SNMP mode)" "NMC Minislot (Ref 66102)" "snmp-ups (experimental)"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar (XML/HTTP mode)" "SNMP/Web Minislot card (ref 66244)" "netxml-ups (experimental)"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar (SNMP mode)" "SNMP/Web Minislot card (ref 66244)" "snmp-ups (experimental)"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar / Comet / Galaxy (SNMP)" "SNMP card (ref 66062)" "snmp-ups (experimental)"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "Pulsar (SNMP)" "SNMP card (ref 66045)" "snmp-ups (experimental)"
|
||||||
|
"MGE UPS SYSTEMS" "ups" "5" "UM-Link (SNMP)" "Not a UPS (ref 66850)" "snmp-ups (experimental)"
|
||||||
|
|
||||||
|
"MicroDowell" "ups" "1" "B.Box BP 500" "" "powerpanel"
|
||||||
|
"MicroDowell" "ups" "1" "B.Box BP 750" "" "powerpanel"
|
||||||
|
"MicroDowell" "ups" "1" "B.Box BP 1000" "" "powerpanel"
|
||||||
|
"MicroDowell" "ups" "1" "B.Box BP 1500" "" "powerpanel"
|
||||||
|
"MicroDowell" "ups" "5" "Enterprise B8" "" "microdowell"
|
||||||
|
"MicroDowell" "ups" "5" "Enterprise B10" "" "microdowell"
|
||||||
|
"MicroDowell" "ups" "5" "Enterprise N8" "" "microdowell"
|
||||||
|
"MicroDowell" "ups" "5" "Enterprise N11" "" "microdowell"
|
||||||
|
"MicroDowell" "ups" "5" "Enterprise N15" "" "microdowell"
|
||||||
|
"MicroDowell" "ups" "5" "Enterprise N20" "" "microdowell"
|
||||||
|
"MicroDowell" "ups" "5" "Enterprise N22" "" "microdowell"
|
||||||
|
"MicroDowell" "ups" "5" "Enterprise N30" "" "microdowell"
|
||||||
|
"MicroDowell" "ups" "5" "Enterprise N40" "" "microdowell"
|
||||||
|
"MicroDowell" "ups" "5" "Enterprise N50" "" "microdowell"
|
||||||
|
"MicroDowell" "ups" "5" "Enterprise N60" "" "microdowell"
|
||||||
|
"MicroDowell" "ups" "5" "Enterprise HiBox ST" "" "microdowell"
|
||||||
|
|
||||||
|
"Microsol" "ups" "4" "Solis 1.0" "1000VA" "solis"
|
||||||
|
"Microsol" "ups" "4" "Solis 1.5" "1500VA" "solis"
|
||||||
|
"Microsol" "ups" "4" "Solis 2.0" "2000VA" "solis"
|
||||||
|
"Microsol" "ups" "4" "Solis 3.0" "3000VA" "solis"
|
||||||
|
"Microsol" "ups" "5" "Rhino 6.0" "6000VA" "rhino"
|
||||||
|
"Microsol" "ups" "5" "Rhino 7.5" "7500VA" "rhino"
|
||||||
|
"Microsol" "ups" "5" "Rhino 10.0" "10000VA" "rhino"
|
||||||
|
"Microsol" "ups" "5" "Rhino 20.0" "20000VA" "rhino"
|
||||||
|
|
||||||
|
"Mustek" "ups" "2" "Powermust" "400VA Plus" "blazer_ser"
|
||||||
|
"Mustek" "ups" "2" "Powermust" "600VA Plus" "blazer_ser"
|
||||||
|
"Mustek" "ups" "2" "Powermust" "800VA Pro" "blazer_ser"
|
||||||
|
"Mustek" "ups" "2" "Powermust" "1000VA Plus" "blazer_ser"
|
||||||
|
"Mustek" "ups" "2" "Powermust" "1400VA Plus" "blazer_ser"
|
||||||
|
"Mustek" "ups" "2" "Powermust" "2000VA USB" "blazer_ser"
|
||||||
|
"Mustek" "ups" "2" "Powermust Office 650" "USB" "blazer_usb"
|
||||||
|
"Mustek" "ups" "2" "PowerMust 424 / 636 / 848" "USB" "blazer_usb"
|
||||||
|
"Mustek" "ups" "2" "Various" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Neus" "ups" "2" "400va / 600va" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Nitram" "ups" "1" "Elite 500" "" "genericups upstype=8"
|
||||||
|
"Nitram" "ups" "1" "Elite 2002" "" "genericups upstype=16"
|
||||||
|
"Nitram" "ups" "1" "Elite 2005" "" "powerpanel"
|
||||||
|
|
||||||
|
"Oneac" "ups" "1" "ON400" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON600" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON900" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON1300" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "EG Series" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON700" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON700XAU" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON700XIU" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON1000" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON1000XAU" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON1000XIU" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON1500" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON1500XAU" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON1500XIU" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON2000" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON2000XAU" "advanced interface" "oneac"
|
||||||
|
"Oneac" "ups" "1" "ON2000XIU" "advanced interface" "oneac"
|
||||||
|
|
||||||
|
"Online" "ups" "1" "P-Series" "" "genericups upstype=14"
|
||||||
|
"Online" "ups" "1" "Zinto D" "" "optiups"
|
||||||
|
|
||||||
|
"OnLite" "ups" "2" "AQUA" "50" "blazer_ser"
|
||||||
|
|
||||||
|
"Opti-UPS" "ups" "1" "PowerES" "420E" "optiups"
|
||||||
|
|
||||||
|
"Orvaldi Power Protection" "ups" "2" "various" "not 400 or 600" "blazer_ser"
|
||||||
|
|
||||||
|
"Phasak" "ups" "2" "400VA / 600VA" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Plexus" "ups" "2" "500VA" "USB" "blazer_usb"
|
||||||
|
"Plexus" "ups" "2" "1000VA Pro" "USB" "blazer_usb"
|
||||||
|
|
||||||
|
"Powercom" "ups" "4" "SMK" "" "blazer_ser"
|
||||||
|
"Powercom" "ups" "4" "SXL" "" "blazer_ser"
|
||||||
|
"Powercom" "ups" "4" "ULT" "" "blazer_ser"
|
||||||
|
"Powercom" "ups" "4" "Trust 425/625" "" "powercom"
|
||||||
|
"Powercom" "ups" "4" "Advice Partner/King Pr750" "" "powercom"
|
||||||
|
"Powercom" "ups" "4" "Black Knight PRO" "" "powercom"
|
||||||
|
"Powercom" "ups" "5" "Black Knight PRO" "USB (2009 models, product id: 00a6)" "usbhid-ups (experimental)"
|
||||||
|
"Powercom" "ups" "4" "Smart KING Pro (all Smart series)" "" "powercom"
|
||||||
|
"Powercom" "ups" "5" "Smart KING Pro (all Smart series)" "USB (2009 models, product id: 00a3)" "usbhid-ups (experimental)"
|
||||||
|
"Powercom" "ups" "4" "Imperial" "" "powercom"
|
||||||
|
"Powercom" "ups" "5" "Imperial" "USB (2009 models, product id: 00a2)" "usbhid-ups (experimental)"
|
||||||
|
"Powercom" "ups" "4" "Vanguard" "" "blazer_ser"
|
||||||
|
"Powercom" "ups" "5" "Vanguard" "USB (2009 models, product id: 00a5)" "usbhid-ups (experimental)"
|
||||||
|
"Powercom" "ups" "4" "WOW" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)"
|
||||||
|
"Powercom" "ups" "5" "WOW" "USB (2009 models, product id: 00a4)" "usbhid-ups (experimental)"
|
||||||
|
"Powercom" "ups" "4" "(various)" "USB (<= 2009 models, product id: 0002)" "powercom (requires 'usbserial' kernel module)"
|
||||||
|
"Powercom" "ups" "5" "(various)" "USB (2009 models, product id: 00a?)" "usbhid-ups (experimental)"
|
||||||
|
|
||||||
|
"PowerGuard" "ups" "2" "PG-600" "" "blazer_ser"
|
||||||
|
|
||||||
|
"PowerKinetics" "ups" "1" "9001" "" "genericups upstype=17"
|
||||||
|
"PowerKinetics" "ups" "2" "BlackOut Buster" "" "blazer_ser"
|
||||||
|
|
||||||
|
"PowerMan" "ups" "2" "RealSmart 800" "" "blazer_ser"
|
||||||
|
"PowerMan" "ups" "2" "RealSmart 1000" "" "blazer_ser"
|
||||||
|
"PowerMan" "ups" "1" "BackPro" "" "genericups upstype=4"
|
||||||
|
|
||||||
|
"PowerTech" "ups" "1" "Comp1000" "DTR cable power" "genericups upstype=3"
|
||||||
|
"PowerTech" "ups" "2" "SMK-800" "" "blazer_ser"
|
||||||
|
|
||||||
|
"PowerWalker" "ups" "2" "Line-Interactive VI 1000" "" "blazer_ser"
|
||||||
|
"PowerWalker" "ups" "2" "Line-Interactive VI 400/800" "" "blazer_ser"
|
||||||
|
"PowerWalker" "ups" "2" "Line-Interactive VI 600" "" "blazer_ser"
|
||||||
|
"PowerWalker" "ups" "2" "Line-Interactive VI 1400" "" "blazer_usb"
|
||||||
|
|
||||||
|
"Powerware" "ups" "4" "3110" "" "genericups upstype=7"
|
||||||
|
"Powerware" "ups" "4" "3115" "" "genericups upstype=11"
|
||||||
|
"Powerware" "ups" "4" "5119, 5125" "" "genericups upstype=15"
|
||||||
|
"Powerware" "ups" "4" "5119 RM" "" "genericups upstype=20"
|
||||||
|
"Powerware" "ups" "5" "5119 RM" "" "upscode2"
|
||||||
|
"Powerware" "ups" "5" "PW3105" "" "bcmxcp_usb"
|
||||||
|
"Powerware" "ups" "5" "PW5110" "" "bcmxcp_usb"
|
||||||
|
"Powerware" "ups" "5" "PW5115" "Serial port" "bcmxcp"
|
||||||
|
"Powerware" "ups" "5" "PW5115" "USB port" "bcmxcp_usb"
|
||||||
|
"Powerware" "ups" "5" "PW5125" "" "bcmxcp"
|
||||||
|
"Powerware" "ups" "5" "PW9120" "Serial port" "bcmxcp"
|
||||||
|
"Powerware" "ups" "5" "PW9120" "USB port" "bcmxcp_usb"
|
||||||
|
"Powerware" "ups" "5" "PW9125" "" "bcmxcp"
|
||||||
|
"Powerware" "ups" "5" "PW9315" "3-phase" "bcmxcp"
|
||||||
|
"Powerware" "ups" "5" "9110" "" "upscode2"
|
||||||
|
"Powerware" "ups" "5" "9120" "" "upscode2"
|
||||||
|
"Powerware" "ups" "5" "9150" "" "upscode2"
|
||||||
|
"Powerware" "ups" "5" "9305" "" "upscode2"
|
||||||
|
"Powerware" "ups" "5" "BladeUPS (SNMP)" "ConnectUPS Web/SNMP Card" "snmp-ups (experimental)"
|
||||||
|
"Powerware" "ups" "5" "(various)" "ConnectUPS Web/SNMP card" "snmp-ups (experimental)"
|
||||||
|
|
||||||
|
"Powerwell" "ups" "1" "PM525A/-625A/-800A/-1000A/-1250A" "" "safenet"
|
||||||
|
|
||||||
|
"Phantom" "pdu" "1" "Rackable Systems" "1 outlets" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
|
"Raritan" "pdu" "3" "Intelligent PDU - Dominion PX" "no report, but should be supported" "snmp-ups (experimental)"
|
||||||
|
"Raritan" "pdu" "3" "Metered PDU - Raritan PM" "no report, but should be supported" "snmp-ups (experimental)"
|
||||||
|
"Raritan" "pdu" "3" "Switched PDU - Raritan RPC" "no report, but should be supported" "snmp-ups (experimental)"
|
||||||
|
|
||||||
|
"Repotec" "ups" "1" "RPF525/625/800/1000" "" "safenet"
|
||||||
|
"Repotec" "ups" "1" "RPT-800A" "" "genericups upstype=13"
|
||||||
|
"Repotec" "ups" "1" "RPT-162A" "" "genericups upstype=13"
|
||||||
|
|
||||||
|
"Rocketfish" "ups" "2" "RF-1000VA / RF-1025VA" "" "usbhid-ups"
|
||||||
|
|
||||||
|
"SmartLabs" "pdu" "1" "2412S Power Line Modem" "for X10/Insteon" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
|
"SMS (Brazil)" "ups" "2" "Manager III" "" "blazer_ser"
|
||||||
|
|
||||||
|
"SOLA" "ups" "1" "305" "cable INT-0025C" "genericups upstype=7"
|
||||||
|
"SOLA" "ups" "1" "325" "" "bestups"
|
||||||
|
"SOLA" "ups" "1" "520" "" "bestups"
|
||||||
|
"SOLA" "ups" "1" "610" "use ID= in ups.conf" "bestups"
|
||||||
|
"SOLA" "ups" "1" "620" "" "bestups"
|
||||||
|
"SOLA" "ups" "4" "330" "" "blazer_ser"
|
||||||
|
|
||||||
|
"SOLA/BASIC Mexico" "ups" "1" "various" "ISBMEX protocol" "isbmex"
|
||||||
|
|
||||||
|
"Socomec" "ups" "2" "NeTYS-PE 600VA" "" "blazer_ser"
|
||||||
|
"Socomec Sicon" "ups" "1" "Egys" "420 VA" "powercom"
|
||||||
|
"Socomec Sicon" "ups" "3" "Netvision" "UPS equipped with Netvision WEB/SNMP card/external box" "snmp-ups (experimental)"
|
||||||
|
|
||||||
|
"Soltec" "ups" "1" "Winmate 525/625/800/1000" "" "safenet"
|
||||||
|
|
||||||
|
"Soyntec" "ups" "2" "Sekury C 500" "" "blazer_ser"
|
||||||
|
"Soyntec" "ups" "2" "Sekury C 800" "" "blazer_ser"
|
||||||
|
|
||||||
|
"SquareOne Power" "ups" "2" "QP1000" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Sun" "pdu" "1" "ILOM Management Module" "1 outlet" "powerman-pdu (experimental)"
|
||||||
|
|
||||||
|
"SuperPower" "ups" "2" "HP360, Hope-550" "" "blazer_ser"
|
||||||
|
|
||||||
|
"SVEN" "ups" "2" "Power Pro+ series" "USB" "blazer_usb"
|
||||||
|
"SVEN" "ups" "2" "Power Smart RM 2000" "USB" "blazer_usb"
|
||||||
|
|
||||||
|
"Sweex" "ups" "1" "500/1000" "smart - shipped with SafeNet" "safenet"
|
||||||
|
"Sweex" "ups" "1" "500/1000" "" "genericups upstype=7"
|
||||||
|
"Sweex" "ups" "1" "1000" "USB" "richcomm_usb"
|
||||||
|
"Sweex" "ups" "2" "(various)" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Sysgration" "ups" "2" "UPGUARDS Pro650" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Tecnoware" "ups" "2" "Easy Power 1200" "" "blazer_ser"
|
||||||
|
|
||||||
|
"Tripp-Lite" "ups" "1" "INTERNETOFFICE700" "USB" "tripplite_usb"
|
||||||
|
"Tripp-Lite" "ups" "2" "OMNIVS1000" "USB" "tripplite_usb"
|
||||||
|
"Tripp-Lite" "ups" "1" "OMNIVS1500XL" "USB" "tripplite_usb"
|
||||||
|
"Tripp-Lite" "ups" "1" "SMART700USB" "USB" "tripplite_usb"
|
||||||
|
"Tripp-Lite" "ups" "1" "SMART1500RM2U" "USB" "tripplite_usb"
|
||||||
|
"Tripp-Lite" "ups" "1" "SMART550USB" "USB" "tripplite_usb"
|
||||||
|
"Tripp-Lite" "ups" "1" "SMART2200RMXL2U" "USB, older models" "tripplite_usb (experimental)"
|
||||||
|
"Tripp-Lite" "ups" "1" "SmartUPS" "" "tripplite"
|
||||||
|
"Tripp-Lite" "ups" "1" "SmartOnline" "" "tripplitesu"
|
||||||
|
"Tripp-Lite" "ups" "1" "(various)" "Lan 2.2 interface - black 73-0844 cable" "genericups upstype=5"
|
||||||
|
"Tripp-Lite" "ups" "2" "OMNI1000LCD" "USB" "usbhid-ups"
|
||||||
|
"Tripp-Lite" "ups" "2" "OMNI900LCD" "USB" "usbhid-ups"
|
||||||
|
"Tripp-Lite" "ups" "2" "OMNI650LCD" "USB" "usbhid-ups"
|
||||||
|
"Tripp-Lite" "ups" "2" "1500 LCD" "USB" "usbhid-ups"
|
||||||
|
"Tripp-Lite" "ups" "2" "AVR550U" "USB" "usbhid-ups"
|
||||||
|
"Tripp-Lite" "ups" "2" "AVR750U" "USB" "usbhid-ups"
|
||||||
|
"Tripp-Lite" "ups" "2" "ECO550UPS" "USB" "usbhid-ups"
|
||||||
|
"Tripp-Lite" "ups" "2" "SmartOnline SU1500RTXL2ua" "USB" "usbhid-ups"
|
||||||
|
"Tripp-Lite" "ups" "2" "smart2200RMXL2U" "USB, newer models" "usbhid-ups"
|
||||||
|
|
||||||
|
"Trust" "ups" "2" "UPS 1000 Management PW-4105" "" "blazer_ser"
|
||||||
|
"Trust" "ups" "2" "UPS 1200VA Management PW-4120M" "" "blazer_ser"
|
||||||
|
"Trust" "ups" "2" "UPS 1300VA Management PW-4130M" "" "blazer_ser"
|
||||||
|
|
||||||
|
"UNITEK" "ups" "2" "ALPHA 500 IC" "" "blazer_ser"
|
||||||
|
"UNITEK" "ups" "2" "Alpha 1000is" "" "blazer_ser"
|
||||||
|
"UNITEK" "ups" "2" "Alpha 500" "" "blazer_ser"
|
||||||
|
"UNITEK" "ups" "2" "Alpha 500 ipE" "" "blazer_ser"
|
||||||
|
"UNITEK" "ups" "2" "Alpha 2600" "" "blazer_ser"
|
||||||
|
"UNITEK" "ups" "2" "Alpha 1200Sx" "USB" "blazer_usb"
|
||||||
|
"UNITEK" "ups" "2" "Alpha 1250xD" "USB" "blazer_usb"
|
||||||
|
|
||||||
|
"UPSonic" "ups" "2" "CXR1000" "" "blazer_ser"
|
||||||
|
"UPSonic" "ups" "1" "LAN Saver 600" "" "genericups upstype=0"
|
||||||
|
"UPSonic" "ups" "1" "Power Guardian" "" "genericups upstype=7"
|
||||||
|
"UPSonic" "ups" "2" "PrOffice 650" "USB" "blazer_usb"
|
||||||
|
"UPSonic" "ups" "2" "DS-800" "USB" "blazer_usb"
|
||||||
|
|
||||||
|
"Various" "ups" "4" "(various)" "SEC protocol" "gamatronic"
|
||||||
|
"Various" "ups" "1" "(various)" "Generic RUPS model" "genericups upstype=4"
|
||||||
|
"Various" "ups" "1" "(various)" "Generic RUPS 2000 (Megatec M2501 cable)" "genericups upstype=21"
|
||||||
|
"Various" "ups" "2" "(various)" "Q1 / Megatec protocol" "blazer_ser"
|
||||||
|
"Various" "ups" "2" "(various)" "PhoenixTec protocol" "bestups"
|
||||||
|
"Various" "ups" "3" "(various)" "SNMP - RFC 1628" "snmp-ups (experimental)"
|
||||||
|
"Various" "ups" "1" "(various)" "Safenet software" "safenet"
|
||||||
|
|
||||||
|
"Victron/IMV" "ups" "1" "(various)" "" "victronups"
|
||||||
|
"Victron/IMV" "ups" "1" "Lite" "crack cable" "genericups upstype=10"
|
||||||
|
|
||||||
|
"Viewsonic" "ups" "1" "PowerES" "420E" "optiups"
|
||||||
|
|
||||||
|
"WinPower" "ups" "2" "CPM-800" "" "blazer_ser"
|
||||||
|
|
||||||
|
"WTI" "pdu" "1" "RPS-10" "10 outlets" "powerman-pdu (experimental)"
|
||||||
|
"WTI" "pdu" "1" "NPS" "8 outlets" "powerman-pdu (experimental)"
|
70
data/epdu-managed.dev
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
# dummy-ups example device definition file
|
||||||
|
#
|
||||||
|
# Generated using:
|
||||||
|
# $ upsc ups@host > epdu-managed.dev
|
||||||
|
|
||||||
|
device.mfr: EATON | Powerware
|
||||||
|
device.model: DBQ10634/5
|
||||||
|
device.serial: ADO6750531
|
||||||
|
device.type: pdu
|
||||||
|
driver.name: snmp-ups
|
||||||
|
driver.parameter.pollinterval: 2
|
||||||
|
driver.parameter.port: somewhere.org
|
||||||
|
driver.version: 2.3.0-1540MS
|
||||||
|
driver.version.internal: 0.44 (mib: aphel_revelation 0.2)
|
||||||
|
outlet.1.current: 0.00
|
||||||
|
outlet.1.current.maximum: 0.00
|
||||||
|
outlet.1.desc: Outlet 1
|
||||||
|
outlet.1.id: 1
|
||||||
|
outlet.1.power: 0.00
|
||||||
|
outlet.1.powerfactor: 0.05
|
||||||
|
outlet.1.realpower: 0.00
|
||||||
|
outlet.1.status: on
|
||||||
|
outlet.1.switchable: 0.00
|
||||||
|
outlet.1.voltage: 247.00
|
||||||
|
outlet.2.current: 0.00
|
||||||
|
outlet.2.current.maximum: 0.16
|
||||||
|
outlet.2.desc: Outlet 2
|
||||||
|
outlet.2.id: 2
|
||||||
|
outlet.2.power: 0.00
|
||||||
|
outlet.2.powerfactor: 0.01
|
||||||
|
outlet.2.realpower: 0.00
|
||||||
|
outlet.2.status: on
|
||||||
|
outlet.2.switchable: 1.00
|
||||||
|
outlet.2.voltage: 247.00
|
||||||
|
outlet.3.current: 0.00
|
||||||
|
outlet.3.current.maximum: 0.16
|
||||||
|
outlet.3.desc: Outlet 3
|
||||||
|
outlet.3.id: 3
|
||||||
|
outlet.3.power: 0.00
|
||||||
|
outlet.3.powerfactor: 0.13
|
||||||
|
outlet.3.realpower: 0.00
|
||||||
|
outlet.3.status: on
|
||||||
|
outlet.3.switchable: 2.00
|
||||||
|
outlet.3.voltage: 247.00
|
||||||
|
outlet.4.current: 0.19
|
||||||
|
outlet.4.current.maximum: 0.56
|
||||||
|
outlet.4.desc: Outlet 4
|
||||||
|
outlet.4.id: 2
|
||||||
|
outlet.4.power: 46.00
|
||||||
|
outlet.4.powerfactor: 0.60
|
||||||
|
outlet.4.realpower: 28.00
|
||||||
|
outlet.4.status: on
|
||||||
|
outlet.4.switchable: 3.00
|
||||||
|
outlet.4.voltage: 247.00
|
||||||
|
outlet.count: 4.00
|
||||||
|
outlet.current: 0.19
|
||||||
|
outlet.desc: All outlets
|
||||||
|
outlet.id: 0
|
||||||
|
outlet.power: 46.00
|
||||||
|
outlet.realpower: 28.00
|
||||||
|
outlet.voltage: 247.00
|
||||||
|
ups.firmware: 01.01.00
|
||||||
|
ups.id: my_device234
|
||||||
|
ups.macaddr:
|
||||||
|
ups.mfr: EATON | Powerware
|
||||||
|
ups.model: DBQ10634/5
|
||||||
|
ups.serial: ADO6750531
|
||||||
|
ups.status:
|
||||||
|
ups.temperature: 49.00
|
||||||
|
device.type: pdu
|
|
@ -1,4 +1,9 @@
|
||||||
# dummy-ups example definition file ; generated with "upsc ups@host > evolution500.dev"
|
# dummy-ups example power sequence file
|
||||||
|
#
|
||||||
|
# Base is the same as .dev files, generated using:
|
||||||
|
# $ upsc ups@host > evolution500.seq
|
||||||
|
#
|
||||||
|
# TIMER have then been added to generate power events.
|
||||||
|
|
||||||
battery.charge: 90
|
battery.charge: 90
|
||||||
battery.charge.low: 30
|
battery.charge.low: 30
|
|
@ -1,4 +1,4 @@
|
||||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
@ -39,12 +39,13 @@ subdir = data/html
|
||||||
DIST_COMMON = README $(am__dist_html_DATA_DIST) $(srcdir)/Makefile.am \
|
DIST_COMMON = README $(am__dist_html_DATA_DIST) $(srcdir)/Makefile.am \
|
||||||
$(srcdir)/Makefile.in $(srcdir)/header.html.in
|
$(srcdir)/Makefile.in $(srcdir)/header.html.in
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_ipv6.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
|
@ -54,6 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
|
$(top_srcdir)/m4/nut_config_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.in
|
$(top_srcdir)/configure.in
|
||||||
|
@ -90,9 +92,11 @@ am__base_list = \
|
||||||
am__installdirs = "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)"
|
am__installdirs = "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)"
|
||||||
DATA = $(dist_html_DATA) $(nodist_html_DATA)
|
DATA = $(dist_html_DATA) $(nodist_html_DATA)
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
A2X = @A2X@
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
|
ASCIIDOC = @ASCIIDOC@
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -105,8 +109,10 @@ CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DBLATEX = @DBLATEX@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -123,7 +129,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@
|
||||||
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
||||||
HAL_FDI_PATH = @HAL_FDI_PATH@
|
HAL_FDI_PATH = @HAL_FDI_PATH@
|
||||||
HAL_USER = @HAL_USER@
|
HAL_USER = @HAL_USER@
|
||||||
HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
@ -134,22 +139,22 @@ LDFLAGS = @LDFLAGS@
|
||||||
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
||||||
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
||||||
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
||||||
LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@
|
LIBHAL_LIBS = @LIBHAL_LIBS@
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@
|
LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
||||||
LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@
|
LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
|
822
docs/FAQ
|
@ -1,822 +0,0 @@
|
||||||
Desc: Frequently Asked Questions
|
|
||||||
File: FAQ
|
|
||||||
Date: 20 January 2006
|
|
||||||
Auth: Russell Kroll <rkroll@exploits.org>
|
|
||||||
Arnaud Quette <aquette.dev@gmail.com>
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: I just upgraded, and ...
|
|
||||||
|
|
||||||
A: You have read UPGRADING in the base directory of the distribution,
|
|
||||||
right? If not, go read it now, then come back to this file if your
|
|
||||||
question wasn't answered in there.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: upsstats says "Error: can't open template file (upsstats.html)".
|
|
||||||
How do I fix this?
|
|
||||||
|
|
||||||
A: Go into your configuration path (/usr/local/ups/etc by default) and
|
|
||||||
copy the sample template files over to their real names. The sample
|
|
||||||
template files are installed with 'make install-cgi-conf' and can
|
|
||||||
also be found inside the source distribution in the conf directory.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: upsmon fails the login and says "username required" now.
|
|
||||||
|
|
||||||
A: Go read the UPGRADING file again.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: My 1.4 CGI programs won't talk to my 2.0 upsd. What should I do?
|
|
||||||
|
|
||||||
A: Upgrade the CGI programs to 2.0. While 1.4 was intended as a
|
|
||||||
compatibility tree that used the new protocol by default, the CGI
|
|
||||||
programs were not upgraded at the same time. The 1.4 versions
|
|
||||||
still use the old REQ protocol, and your 2.0 upsd expects GET.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: I just upgraded from 1.2 and upsmon now fails to start, saying
|
|
||||||
"Fatal error: insufficient power configured!". Why?
|
|
||||||
|
|
||||||
A: You didn't read the top of the error, where upsmon says that it
|
|
||||||
ignored the invalid MONITOR line because UPS directives now require
|
|
||||||
a UPS name. It also means you didn't see the same warning in
|
|
||||||
UPGRADING.
|
|
||||||
|
|
||||||
At least you saw this in the FAQ before asking the list.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: My UPS driver now says it's "broken", and won't start. What now?
|
|
||||||
|
|
||||||
Q: My favorite UPS driver disappeared after an upgrade. What now?
|
|
||||||
|
|
||||||
A: Drivers are occasionally removed from the tree if they are no longer
|
|
||||||
receiving maintenance, or sometimes renamed to better reflect their
|
|
||||||
hardware support scope or replaced by a more generic driver.
|
|
||||||
There have been several architectural changes to the driver code
|
|
||||||
in recent times, and drivers which were not converted by someone
|
|
||||||
are eventually dropped.
|
|
||||||
|
|
||||||
This is called progress. We do this in order to avoid a situation
|
|
||||||
where someone believes that a driver is being maintained when it is
|
|
||||||
actually rotting slowly in the tree. It also keeps the tree free of
|
|
||||||
old compatibility hacks for code that nobody actually uses anyway.
|
|
||||||
|
|
||||||
To get a driver back into current releases, you need to convert it
|
|
||||||
yourself or get someone to do it for you. This is not difficult.
|
|
||||||
The hardest part of any driver is decoding the protocol, and that's
|
|
||||||
already been done in the old version.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: I just upgraded and now I can't talk to older versions.
|
|
||||||
|
|
||||||
A: Version 2.0 can't communicate with anything before 1.4 due to the
|
|
||||||
protocol changes. Version 1.4 can communicate with both 2.0 and
|
|
||||||
most older versions since it was a transitional release and has
|
|
||||||
compatibility code for both protocols.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: My UPS driver program won't work. I'm starting it as root, and root
|
|
||||||
owns the device, so what's the problem?
|
|
||||||
|
|
||||||
A: The drivers drop root privileges long before the serial port is
|
|
||||||
opened. You'll need to change the permissions on that port so that
|
|
||||||
their new user id can access it. Normally this is "nobody", but it
|
|
||||||
may be changed at compile-time by using configure --with-user.
|
|
||||||
|
|
||||||
Read the error message. If you have a permissions mismatch, then
|
|
||||||
you'll see something like this:
|
|
||||||
|
|
||||||
Network UPS Tools - APC Smart protocol driver 0.60 (1.1.7)
|
|
||||||
This program is currently running as youruid (UID 1234)
|
|
||||||
/dev/ttyS2 is owned by user root (UID 0), mode 0600
|
|
||||||
Change the port name, or fix the permissions or ownership
|
|
||||||
of /dev/ttyS2 and try again.
|
|
||||||
Unable to open /dev/ttyS2: Permission denied
|
|
||||||
|
|
||||||
Now is a good time to point out that using "nobody" is a bad idea,
|
|
||||||
since it's a hack for NFS access. You should create a new role
|
|
||||||
account (perhaps called "ups" or "nut"), and use that instead.
|
|
||||||
|
|
||||||
Also, scroll down to the "security domains" question to see an
|
|
||||||
even better way of restricting privileged operations. Neither the
|
|
||||||
drivers nor upsd ever need root powers, and that answer tells you
|
|
||||||
how to make it work.
|
|
||||||
|
|
||||||
A: You can also specify a user with "user=" in the global part of
|
|
||||||
ups.conf. Just define it before any of your [sections]:
|
|
||||||
|
|
||||||
user = nut
|
|
||||||
|
|
||||||
[myups]
|
|
||||||
driver = mge-shut
|
|
||||||
port = /dev/ttyS0
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: upsc, upsstats, and the other clients say "access denied". The device
|
|
||||||
communication port (serial, USB or network) permissions are fine, so what
|
|
||||||
gives?
|
|
||||||
|
|
||||||
A: In this case, "access denied" means the access to upsd, not the device
|
|
||||||
communication port. You're being denied since the system has no
|
|
||||||
permission to speak to upsd according to the access controls.
|
|
||||||
|
|
||||||
There can be various reasons. To fix it, check:
|
|
||||||
- the LISTEN directive in upsd.conf. It should allow your local or remote
|
|
||||||
access method,
|
|
||||||
- your firewall rules. Port 3493/tcp must be opened to incoming connexions,
|
|
||||||
- your tcp-wrappers configuration (hosts.allow and hosts.deny).
|
|
||||||
|
|
||||||
Refer to the upsd(8) and upsd.conf(5) manpages for more information.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: I have an APC Smart-UPS connected with a grey APC cable and it won't
|
|
||||||
work. The Back-UPS type in the genericups driver works but then I
|
|
||||||
don't get to use all the nifty features in there. Why doesn't the
|
|
||||||
right driver work?
|
|
||||||
|
|
||||||
A: The problem lies in your choice of cable. APC's grey cables
|
|
||||||
generally only do "dumb" signalling - very basic yes/no info about
|
|
||||||
the battery and line status. While that is sufficient to detect a
|
|
||||||
low battery condition while on battery, you miss out on all the
|
|
||||||
goodies that you paid for.
|
|
||||||
|
|
||||||
Note that the 940-0095B happens to be a grey cable, but it is actually
|
|
||||||
a dual mode cable and can be used in smart mode. If you have
|
|
||||||
this cable, you need to edit your ups.conf to look like this:
|
|
||||||
|
|
||||||
[myups]
|
|
||||||
driver = apcsmart
|
|
||||||
port = /dev/whatever
|
|
||||||
cable = 940-0095B
|
|
||||||
|
|
||||||
All other grey cables from APC are assumed to be "dumb".
|
|
||||||
|
|
||||||
If your grey cable isn't the 940-0095B, the solution is to dump that
|
|
||||||
cable and find one that supports APC's "smart" signalling. Typically
|
|
||||||
these come with the UPS and are black. If your smart cable has
|
|
||||||
wandered off, one can be built rather easily with some connectors and
|
|
||||||
cable - there's no fancy wiring or resistors.
|
|
||||||
|
|
||||||
See this URL for a handy diagram:
|
|
||||||
|
|
||||||
http://random.networkupstools.org/cables/940-0024C.jpg
|
|
||||||
|
|
||||||
There is also a text version of that diagram in the docs/cables
|
|
||||||
directory of the NUT source distribution. Either one should allow
|
|
||||||
you to build a good clone of APC's 940-0024C cable.
|
|
||||||
|
|
||||||
There are simpler solutions involving 3 wires that work just fine
|
|
||||||
too, but Powerchute won't find the loopback DTR-DCD and RTS-CTS and
|
|
||||||
will be annoyed. If you don't ever plan to use Powerchute, 3 wires
|
|
||||||
(RxD, TxD, GND) are sufficient.
|
|
||||||
|
|
||||||
It should also be noted that the genericups driver has no way to
|
|
||||||
detect the UPS, so it will fire up quite happily if it can open the
|
|
||||||
serial port. Merely having it start up is not necessarily an
|
|
||||||
indication of success. You should start it and then check the
|
|
||||||
status with upsc or similar to be sure that it's reading the
|
|
||||||
hardware properly.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Why does configure fail to find gd?
|
|
||||||
|
|
||||||
A: Recent versions of gd should be detected automatically through the
|
|
||||||
gdlib-config script. Note that gd 2.0.5 through 2.0.7 have an
|
|
||||||
unusable script, so upgrade to the newest version if you have one
|
|
||||||
of those installed.
|
|
||||||
|
|
||||||
If you're stuck with an older version of gd, you can use it if you
|
|
||||||
specify the flags manually. Look in gd's Makefile for "LIBS=",
|
|
||||||
then use that value when you call configure:
|
|
||||||
|
|
||||||
./configure --with-gd-libs="<whatever>" --with-cgi
|
|
||||||
|
|
||||||
If you don't have gd's Makefile available for some reason, you're
|
|
||||||
in for a lot of trial and error.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Why PNG? You used to generate GIF bars with upsimage back in 1998
|
|
||||||
or 1999...
|
|
||||||
|
|
||||||
A: http://www.burnallgifs.org/
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Why doesn't upsd implement the functionality of upsmon? I have to
|
|
||||||
run THREE programs to monitor my UPS!
|
|
||||||
|
|
||||||
A: I try to follow the "tool for the job" philosophy. It may mean
|
|
||||||
more programs running, but the flexibility you get is usually
|
|
||||||
worth it.
|
|
||||||
|
|
||||||
Yes, the machine with the UPS attached will generally have 3
|
|
||||||
processes (driver, upsd, upsmon) running, but this design allows a
|
|
||||||
much bigger setup. Imagine a data room with a bunch of machines
|
|
||||||
all drawing power from the same UPS. The rest of them just run
|
|
||||||
upsmon.
|
|
||||||
|
|
||||||
Besides, if upsmon were rolled into upsd, upsd would get even
|
|
||||||
bigger than it is now. You'd have one less process, but the
|
|
||||||
RAM consumption would be pretty close to now.
|
|
||||||
|
|
||||||
See data-room.txt for more configuration ideas and explanations.
|
|
||||||
|
|
||||||
A: If this really bothers you, roll up your sleeves and use the
|
|
||||||
sockdebug code to write a "upsmon" type program that sits on top of
|
|
||||||
the state sockets. It won't work over the network, but it means
|
|
||||||
you don't need upsd. It also means only one host can monitor the
|
|
||||||
UPS.
|
|
||||||
|
|
||||||
This is also a good option to consider if you can't use networked
|
|
||||||
monitoring code for security or safety reasons.
|
|
||||||
|
|
||||||
See ideas.txt for more on this and other related topics.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Why isn't upssched part of upsmon?
|
|
||||||
|
|
||||||
A: Most users will never have any reason to use upssched. It's
|
|
||||||
complicated, and getting it right for your situation can be tricky.
|
|
||||||
Having it live in a separate program saves resources and lets most
|
|
||||||
people avoid it completely.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Why doesn't upsmon send a SIGPWR signal to init so it can deal with
|
|
||||||
power events?
|
|
||||||
|
|
||||||
A: New versions of the init man page taken from the sysvinit package
|
|
||||||
are saying that usage of SIGPWR is discouraged, since /dev/initctl
|
|
||||||
control channel is the preferred way of communication.
|
|
||||||
|
|
||||||
A: The name of the game is portability. Not everyone's init handles
|
|
||||||
that kind of signalling gracefully. What's more, some admins
|
|
||||||
might want to do things differently even if they have that kind of
|
|
||||||
init running.
|
|
||||||
|
|
||||||
So, to be compatible, upsmon just invokes a shell command. If you
|
|
||||||
want to use init's SIGPWR stuff, just put the right "kill" line in
|
|
||||||
a shell script and make upsmon call it. Everyone wins.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Why can't upsset read my upsset.passwd file?
|
|
||||||
|
|
||||||
A: You have an old version of upsset installed, since the current
|
|
||||||
version doesn't use that file. Install a new version and then try
|
|
||||||
it again.
|
|
||||||
|
|
||||||
Be sure to secure your CGI directory as instructed in the
|
|
||||||
upsset.conf.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Why won't bestups talk to my Best Fortress UPS?
|
|
||||||
|
|
||||||
A: There are at least two different protocols being used for hardware
|
|
||||||
with very similar names. The bestups driver tends to support the
|
|
||||||
units built around the newer "PhoenixTec" protocol.
|
|
||||||
|
|
||||||
Previous releases of this software included a driver called
|
|
||||||
bestfortress which supported the older Best hardware. See the
|
|
||||||
earlier entries about updating old drivers which have been removed
|
|
||||||
from the tree.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: What's this about "data stale"?
|
|
||||||
|
|
||||||
A: It means your UPS driver hasn't updated things in a little while.
|
|
||||||
upsd refuses to serve up data that isn't fresh, so you get the
|
|
||||||
errors about staleness.
|
|
||||||
|
|
||||||
If this happens to you, make sure your driver is still running.
|
|
||||||
Also look at the syslog. Sometimes the driver loses the connection
|
|
||||||
to the UPS, and that will also make the data go stale.
|
|
||||||
|
|
||||||
Note: some very slow machines have trouble keeping up with the
|
|
||||||
serial ports during periods of extreme load. My old 486 used to
|
|
||||||
flip between "stale" and "OK" while running backups.
|
|
||||||
|
|
||||||
If this happens a lot, you might consider cranking up DEADTIME
|
|
||||||
in the upsmon.conf to suppress some of the warnings for shorter
|
|
||||||
intervals. Use caution when adjusting this number, since it
|
|
||||||
directly affects how long you run on battery without knowing
|
|
||||||
what's going on with the UPS.
|
|
||||||
|
|
||||||
Note: some drivers occasionally need more time to update than the
|
|
||||||
default value of MAXAGE (in upsd.conf) allows. As a result, they
|
|
||||||
are temporarily marked stale even though everything is fine. This
|
|
||||||
can happen with MGE Ellipse equipment - see the mge-shut man page.
|
|
||||||
In such cases, you can raise the value of MAXAGE to avoid these
|
|
||||||
warnings; try a value like 25 or 30.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Why do the client programs say "Driver not connected" when I try
|
|
||||||
to run them?
|
|
||||||
|
|
||||||
A: This means that upsd can't connect to the driver for some reason.
|
|
||||||
Your ups.conf entry might be wrong, or the driver might not be
|
|
||||||
running. Maybe your state path is not configured properly.
|
|
||||||
|
|
||||||
Check your syslog. upsd will complain regularly if it can't
|
|
||||||
connect to a driver, and it should say why it can't connect.
|
|
||||||
|
|
||||||
Note: if you jumped in with both feet and didn't follow the INSTALL
|
|
||||||
document, you probably started upsd by itself. You have to run
|
|
||||||
'upsdrvctl start' to start the drivers after configuring ups.conf.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Everything works perfectly during the shutdown, and the UPS comes
|
|
||||||
back on, but my system stays off. What's happening?
|
|
||||||
|
|
||||||
A: Assuming you don't have the problem in the next question, then you
|
|
||||||
probably have an ATX motherboard, have APM or ACPI enabled in your
|
|
||||||
kernel (assuming Linux here), and are reaching the 'halt' at the
|
|
||||||
bottom of your shutdown scripts.
|
|
||||||
|
|
||||||
Your machine obeys and shuts down, and stays down, since it
|
|
||||||
remembers the 'last state' when the UPS restarts.
|
|
||||||
|
|
||||||
One solution is to change your shutdown scripts so you never reach
|
|
||||||
that point. You *want* the system to die without reaching the
|
|
||||||
part where the kernel tells it to shut down. A possible script
|
|
||||||
might look like this:
|
|
||||||
|
|
||||||
# other shutdown stuff here (mount -o remount,ro ...)
|
|
||||||
|
|
||||||
if (test -f /etc/killpower)
|
|
||||||
then
|
|
||||||
/usr/local/ups/bin/upsdrvctl shutdown
|
|
||||||
|
|
||||||
sleep 600 # this should never return
|
|
||||||
|
|
||||||
# uh oh, we never got shut down! (power race?)
|
|
||||||
reboot
|
|
||||||
fi
|
|
||||||
|
|
||||||
halt -p
|
|
||||||
|
|
||||||
The other solution is to change your BIOS setting to "always power
|
|
||||||
on" instead of "last state", assuming that's possible.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: My system has an ATX power supply. It will power off just fine, but
|
|
||||||
it doesn't turn back on. What can I do to fix this?
|
|
||||||
|
|
||||||
A: This depends on how clueful your motherboard manufacturer is, and
|
|
||||||
isn't a matter of the OS. You have to do one of the following
|
|
||||||
things depending on what's supported:
|
|
||||||
|
|
||||||
- Set a jumper on the motherboard that means "return after outage"
|
|
||||||
|
|
||||||
- Set something in the BIOS that says "power up after power failure"
|
|
||||||
|
|
||||||
- Try using something (like a capacitor) across the power button
|
|
||||||
to "push" it for you - this might not work if it needs a delay
|
|
||||||
|
|
||||||
- Hack the cable between the power supply and the motherboard to fool
|
|
||||||
it into powering up whenever line power is present
|
|
||||||
|
|
||||||
- Teach a monkey to watch the machine and press the power button
|
|
||||||
when the outage is over.
|
|
||||||
|
|
||||||
This might work, but it creates high produce bills.
|
|
||||||
|
|
||||||
If you can't use one of the first two options, give the board to
|
|
||||||
an enemy. Let them worry about it.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: My PowerMac G4 won't power back up by itself (into Linux) after the
|
|
||||||
UPS shuts down. What can I do about this?
|
|
||||||
|
|
||||||
A: This is about the same situation as the ATX question above, only
|
|
||||||
worse. Earlier Macs apparently supported a hack where you could
|
|
||||||
cat some magic characters at /dev/adb to enable "server mode".
|
|
||||||
This would instruct the system to reboot while unattended.
|
|
||||||
|
|
||||||
From Usenet post <6boftzxz51.fsf@ecc-office.sp.cs.cmu.edu>:
|
|
||||||
|
|
||||||
# Send packet over the ADB bus to the PowerMac CUDA chip
|
|
||||||
# telling it to reboot automatically when power is restored
|
|
||||||
# after a power failure.
|
|
||||||
|
|
||||||
cat /etc/local/autoboot.adb > /dev/adb
|
|
||||||
|
|
||||||
autoboot.adb contains these three bytes (in hex): 01 13 01
|
|
||||||
|
|
||||||
Unfortunately, the hardware has evolved and there is no good
|
|
||||||
equivalent for this hack on today's systems.
|
|
||||||
|
|
||||||
If you find out how to do this, please send me some mail, since
|
|
||||||
this affects one of my systems and my stop-gap solution is getting
|
|
||||||
cranky.
|
|
||||||
|
|
||||||
Note: this question has been in the FAQ for over a year and
|
|
||||||
there's still no answer. Let me guess: everyone who runs a server
|
|
||||||
on Mac hardware has a team of trained monkeys, and feeds them
|
|
||||||
by growing bananas in the tropical environment formed by waste heat
|
|
||||||
from the equipment.
|
|
||||||
|
|
||||||
The rest of us are still waiting for the answer. Booting into the
|
|
||||||
Mac OS to frob the "file server" panel is not an acceptable
|
|
||||||
solution.
|
|
||||||
|
|
||||||
A: If you're on OS X, this is relatively simple to fix. Go to system
|
|
||||||
preferences, click on energy saver, click on the options tab, check
|
|
||||||
"Restart automatically after a power failure".
|
|
||||||
|
|
||||||
If you're on some other OS, hope they've figured out how to duplicate
|
|
||||||
the above in a non-simian manner.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: I want to keep the drivers and upsd in their own security domains.
|
|
||||||
How can this be accomplished?
|
|
||||||
|
|
||||||
A: Using a few role accounts and a common group, you can limit access
|
|
||||||
to resources such as the serial port(s) leading to the UPS
|
|
||||||
hardware.
|
|
||||||
|
|
||||||
This is just an example. Change the values to suit your systems.
|
|
||||||
|
|
||||||
Create a user called 'nutdev' and another called 'nutsrv'. Put
|
|
||||||
them both in a group called 'nut'.
|
|
||||||
|
|
||||||
Change the owner of any serial ports that will be used to nutdev,
|
|
||||||
and set the mode to 0600. Then change the ownership of your state
|
|
||||||
directory (usually /var/state/ups) to nutdev.nut.
|
|
||||||
|
|
||||||
For my development system this yields the following /dev entries:
|
|
||||||
|
|
||||||
0 crw------- 1 nutdev tty 4, 64 Sep 3 17:11 /dev/ttyS0
|
|
||||||
0 crw------- 1 nutdev tty 4, 65 Sep 3 17:11 /dev/ttyS1
|
|
||||||
|
|
||||||
Switch to root, then start the drivers:
|
|
||||||
|
|
||||||
# /usr/local/ups/bin/upsdrvctl -u nutdev start
|
|
||||||
|
|
||||||
The listing for /var/state/ups then looks like this:
|
|
||||||
|
|
||||||
4 drwxrwx--- 2 nutdev nut 4096 Aug 20 18:37 .
|
|
||||||
4 drwxr-xr-x 4 root root 4096 May 14 21:20 ..
|
|
||||||
4 srw-rw---- 1 nutdev nut 0 Sep 3 17:10 apcsmart-ttyS0
|
|
||||||
4 srw-rw---- 1 nutdev nut 0 Sep 3 17:10 megatec-ttyS1
|
|
||||||
|
|
||||||
You may have to remove old socket or state files first if you are
|
|
||||||
changing to this security scheme from an older version. The drivers
|
|
||||||
will create new files with the right owners and modes.
|
|
||||||
|
|
||||||
Note that /var/state/ups is group writable since upsd will
|
|
||||||
place the upsd.pid file here.
|
|
||||||
|
|
||||||
You may have to change the groups of upsd.conf and upsd.users to
|
|
||||||
make them readable. These files should not be owned by nutsrv,
|
|
||||||
since someone could compromise the daemon and change the config
|
|
||||||
files. Instead, put nutsrv in a group ("nut" in this example), then
|
|
||||||
make the files owned by root.nut, with mode 0640.
|
|
||||||
|
|
||||||
Once the config files are ready, start upsd:
|
|
||||||
|
|
||||||
# /usr/local/ups/sbin/upsd -u nutsrv
|
|
||||||
|
|
||||||
Check your syslog to be sure everything's happy, then be sure to
|
|
||||||
update your startup scripts so it uses this procedure on your next
|
|
||||||
boot.
|
|
||||||
|
|
||||||
If you like this, you'll probably also find the chroot process to
|
|
||||||
be useful and interesting. See chroot.txt for more details.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: What's the point of that 'security domains' concept above?
|
|
||||||
|
|
||||||
A: The point is limiting your losses. If someone should happen to
|
|
||||||
break into upsd in that environment, they should only gain access
|
|
||||||
to that one user account. Direct access to the serial device is
|
|
||||||
not possible, since that is owned by another user.
|
|
||||||
|
|
||||||
There is also the possibility of running the drivers and upsd in a
|
|
||||||
chroot jail. See the chroot.txt provided in the source
|
|
||||||
distribution for an example implementation.
|
|
||||||
|
|
||||||
Why give would-be vandals any sort of help?
|
|
||||||
|
|
||||||
Put it this way - I *wrote* good chunks of this stuff, and I still
|
|
||||||
run the programs this way locally. You should definitely consider
|
|
||||||
using this technique.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: How can I make upsmon shut down my system after some fixed interval?
|
|
||||||
|
|
||||||
A: You probably don't want to do this, since it doesn't maximize your
|
|
||||||
runtime on battery. Assuming you have a good reason for it (see
|
|
||||||
the next entry), then look at upssched.txt or the upssched man
|
|
||||||
page for some ideas.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Why doesn't upsmon shut down my system? I pulled the plug and nothing
|
|
||||||
happened.
|
|
||||||
|
|
||||||
A: Wait. upsmon doesn't consider a UPS to be critical until it's both
|
|
||||||
'on battery' and 'low battery' at the same time. This is by design.
|
|
||||||
Nearly every UPS supports the notion of detecting the low battery
|
|
||||||
all by itself. When the voltage drops below a certain point, it
|
|
||||||
_will_ let you know about it.
|
|
||||||
|
|
||||||
If your system has a really complicated shutdown procedure, you
|
|
||||||
might need to shut down before the UPS raises the low battery flag.
|
|
||||||
For most users, however, the default behavior is adequate.
|
|
||||||
|
|
||||||
Ask yourself this: why buy a nice big UPS with the matching battery
|
|
||||||
and corresponding runtime and then shutdown early? If anything, I'd
|
|
||||||
rather have a few more minutes running on battery during which the
|
|
||||||
power might return. Once the power's back, it's business as usual
|
|
||||||
with no visible interruption in service.
|
|
||||||
|
|
||||||
If you purposely shut down early, you guarantee an interruption in
|
|
||||||
service by bringing down the box.
|
|
||||||
|
|
||||||
See upssched.txt for information on how you can shutdown early if
|
|
||||||
this is what you really want to do.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: The CGI programs report "access to that host is not authorized" -
|
|
||||||
what's going on?
|
|
||||||
|
|
||||||
A: Those programs need to see a host in your hosts.conf before they
|
|
||||||
will attempt communications. This keeps people from feeding it
|
|
||||||
random "host=" settings, which would annoy others with outgoing
|
|
||||||
connection attempts from your system.
|
|
||||||
|
|
||||||
If your hosts.conf turns out to be configured correctly with
|
|
||||||
MONITOR entries and all that, check the permissions. Your web
|
|
||||||
server may be running the CGI programs as a user that can't read
|
|
||||||
the file.
|
|
||||||
|
|
||||||
If you run your web server in a chroot jail, make sure the programs
|
|
||||||
can still read hosts.conf. You may have to copy it into the jail
|
|
||||||
for this to work. If you do that, make sure it's not writable by
|
|
||||||
any of the user accounts which run inside the jail.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: upsd is running, so why can't I connect to it?
|
|
||||||
|
|
||||||
A: Assuming you haven't changed the TCP port number on the command line
|
|
||||||
or at compile-time, then you probably have some sort of firewall
|
|
||||||
blocking the connection.
|
|
||||||
|
|
||||||
upsd listens on TCP port 3493 by default.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: How do you make upsmon reload the config file?
|
|
||||||
|
|
||||||
Q: How do you make upsd reload the config file?
|
|
||||||
|
|
||||||
A: Either find the pid of the background process and send it a SIGHUP,
|
|
||||||
or just start it again with '-c reload'.
|
|
||||||
|
|
||||||
If you send the signals yourself instead of using -c, be sure you
|
|
||||||
hit the right process. There are usually two upsmons, and you
|
|
||||||
should only send signals to one of them. To be safe, read the pid
|
|
||||||
file.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: I just bought a new WhizBang UPS that has a USB connector. How do
|
|
||||||
I monitor it?
|
|
||||||
|
|
||||||
A: There are several driver to support USB models.
|
|
||||||
|
|
||||||
- usbhid-ups supports various manufacturers complying to the HID standard,
|
|
||||||
- tripplite_usb supports various Tripp-Lite units,
|
|
||||||
- bcmxcp_usb supports various Powerware units.
|
|
||||||
|
|
||||||
Refer to the "driver-name" (8) manpage for more information.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: What is this usbhid-ups (formerly newhidups) about?
|
|
||||||
|
|
||||||
A: The basic USB UPS support was done until NUT 2.2 using hidups. To allow
|
|
||||||
a wider support accross platforms for USB/HID compliant devices,
|
|
||||||
usbhid-ups driver uses libusb (which is available for a wide range of
|
|
||||||
operating systems) and libhid (currently, a modified internal version
|
|
||||||
of it).
|
|
||||||
|
|
||||||
As of NUT 2.2, usbhid-ups completely replaces the legacy hidups driver
|
|
||||||
and provide support for various manufacturers. At that time, it will
|
|
||||||
be renamed to usbhid-ups.
|
|
||||||
|
|
||||||
usbhid-ups is built automatically if possible (libusb development files
|
|
||||||
need to be installed) and installed by the "make install" command.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Why doesn't my package work?
|
|
||||||
|
|
||||||
Q: I can't run this because there's no package for it. Why isn't this
|
|
||||||
in a package yet?
|
|
||||||
|
|
||||||
A: Sorry, can't help you there. All official releases are source code
|
|
||||||
and are posted on http://www.networkupstools.org/ along with PGP
|
|
||||||
signatures for verification.
|
|
||||||
|
|
||||||
This means all packages have been built by a third party. If you
|
|
||||||
have an issue that's related to packaging, you will need to seek
|
|
||||||
help with whoever built it for you.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Why are there two copies of upsmon running?
|
|
||||||
|
|
||||||
A: It's not really two complete copies if your OS forks efficiently.
|
|
||||||
|
|
||||||
By default, upsmon runs most of the grunt work as an unprivileged
|
|
||||||
user and keeps a stub process around with root powers that can
|
|
||||||
only shut down the system when necessary. This should make it much
|
|
||||||
harder to gain root in the event a hole is ever discovered in
|
|
||||||
upsmon.
|
|
||||||
|
|
||||||
If this really bothers you and you like running lots of code as
|
|
||||||
root, start upsmon with -p and it will go back to being one big
|
|
||||||
process. This is not recommended, so don't blame me if something
|
|
||||||
bad happens in this mode.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: I have <some problem> with <some old version> ...
|
|
||||||
|
|
||||||
A: Get the latest stable release, and see if it still happens. If it
|
|
||||||
goes away, it means someone else reported it and got it fixed a
|
|
||||||
long time ago.
|
|
||||||
|
|
||||||
If that doesn't work, try the latest development version.
|
|
||||||
|
|
||||||
If your problem is STILL there, then contact the mailing lists.
|
|
||||||
|
|
||||||
Hint: check the release date on the version you have. If it's more
|
|
||||||
than about 6 months old, there's probably a newer stable tree
|
|
||||||
version out there.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Do you have to use a serial connection to monitor the UPS?
|
|
||||||
What about direct network connections (SNMP or otherwise)?
|
|
||||||
|
|
||||||
A: No. NUT currently support USB communication through usbhid-ups,
|
|
||||||
tripplite_usb and bcmxcp_usb, and SNMP communication through snmp-ups.
|
|
||||||
|
|
||||||
Any time there is a gap in features, it's usually because the
|
|
||||||
group of people who own that hardware and the group of people who
|
|
||||||
write code don't overlap. The fix is to make them overlap -
|
|
||||||
turn an owner into a developer or vice-versa.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: What happened to the patch I sent?
|
|
||||||
|
|
||||||
A: If a release goes by and your patch hasn't been included, it was
|
|
||||||
probably dropped. There can be a lot of patches waiting for
|
|
||||||
inclusion at some points, and occasionally some have to be
|
|
||||||
rejected.
|
|
||||||
|
|
||||||
Design issues or severe coding style problems can be the reason
|
|
||||||
for this. I try to point out what the problems are, but there are
|
|
||||||
limits. See developers.txt for some pointers on submitting
|
|
||||||
patches.
|
|
||||||
|
|
||||||
Sometimes patches are put on hold due to a feature freeze. If it
|
|
||||||
doesn't show up once the new version opens up, send it again.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: I'm not much of a programmer. How can I help?
|
|
||||||
|
|
||||||
A: There's always work to be done outside of the realm of code bashing.
|
|
||||||
Documentation might not always be so clear. A user's perspective
|
|
||||||
is sometimes needed to appreciate this. Bug reports on a project's
|
|
||||||
documentation are just as valuable as those for the actual source.
|
|
||||||
|
|
||||||
Fielding questions on the mailing lists is also helpful. This
|
|
||||||
lets other people to focus on coding issues while allowing the
|
|
||||||
original poster to get some information at the same time. It's
|
|
||||||
quite a relief to open that mailbox and find that someone else
|
|
||||||
has already handled it successfully.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: I replaced the battery in my APC Smart-UPS and now it thinks the
|
|
||||||
battery is low all the time. How do you fix this?
|
|
||||||
|
|
||||||
Q: My APC UPS keeps reporting "OL LB", even after it's been charging
|
|
||||||
for many hours. What can I do about this?
|
|
||||||
|
|
||||||
A: This happened to me, and some other people too. The combination of
|
|
||||||
our experiences should prove useful to you.
|
|
||||||
|
|
||||||
First, you need to realize that the UPS apparently stores data about
|
|
||||||
the battery, load, and runtime. After replacing the battery, it
|
|
||||||
needs to be clued in to the new situation. If the traditional
|
|
||||||
runtime calibration doesn't work, you have to try something a
|
|
||||||
little more drastic.
|
|
||||||
|
|
||||||
You need to *completely* drain the UPS while it has a good ground.
|
|
||||||
This means you can't just pull the plug. You also have to
|
|
||||||
disconnect it from the computer so this software won't shut it
|
|
||||||
down.
|
|
||||||
|
|
||||||
The easiest way to do this is to first unplug your computer(s) from
|
|
||||||
it, and plug in a token load like a lamp. Also, move the UPS to a
|
|
||||||
power strip that doesn't switch the ground line or an outlet that
|
|
||||||
you can switch off at your panel.
|
|
||||||
|
|
||||||
Once the UPS is up at 100% charge (this is important), disconnect
|
|
||||||
the power. It _must_ remain connected to the ground, or the
|
|
||||||
results may not be accurate. Ignore the sounds it makes, and go
|
|
||||||
away until it's done. Don't do anything to the front panel while
|
|
||||||
this is happening.
|
|
||||||
|
|
||||||
After all of this, put things back the way they should be and let
|
|
||||||
it charge up. You should find that it again gives reasonable
|
|
||||||
values and behavior, as it was when it was new.
|
|
||||||
|
|
||||||
Thanks to Matthew Dharm for helping me nail down this procedure.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: multimon.cgi seems to be stuck at an old version, even though I
|
|
||||||
just installed a new one.
|
|
||||||
|
|
||||||
A: multimon was removed during the 1.1 development cycle. upsstats
|
|
||||||
now does everything it used to do, and then some. You should just
|
|
||||||
delete those files and start using upsstats directly.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: OK, I switched to upsstats. Now it's giving me Celsius. I like
|
|
||||||
Fahrenheit. Where's the config file to switch it back?
|
|
||||||
|
|
||||||
A: Temperature scales are handled by the template files, so edit your
|
|
||||||
upsstats.html and change it from TEMPC to TEMPF.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: Why is the mailing list ignoring me?
|
|
||||||
|
|
||||||
A: You probably asked a question that's answered in this FAQ or
|
|
||||||
somewhere else in the documentation and nobody wants to quote it
|
|
||||||
for you.
|
|
||||||
|
|
||||||
Convincing the other subscribers that you've actually read down this
|
|
||||||
far might be useful. You might mention "queequeg" for better results.
|
|
||||||
|
|
||||||
This URL may also be helpful:
|
|
||||||
|
|
||||||
http://www.catb.org/~esr/faqs/smart-questions.html
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: I found some information about another kind of UPS protocol you
|
|
||||||
don't support yet, but I don't know what to do with it. Can you
|
|
||||||
help?
|
|
||||||
|
|
||||||
A: If you're not a programmer, you can still help others by making
|
|
||||||
that protocol available. You might host the document somewhere and
|
|
||||||
send the URL to one of the mailing lists.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Q: How can you answer questions to situations that nobody's encountered
|
|
||||||
yet? Isn't this a frequently asked questions file?
|
|
||||||
|
|
||||||
A: Magic.
|
|
||||||
|
|
||||||
A: It's both that and a frequently *anticipated* questions file, too.
|
|
||||||
|
|
||||||
The idea is to write it up in here so that nobody asks the mailing
|
|
||||||
list when it finally does get released.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
735
docs/FAQ.txt
Normal file
|
@ -0,0 +1,735 @@
|
||||||
|
ifndef::external_title[]
|
||||||
|
NUT Frequently Asked Questions
|
||||||
|
==============================
|
||||||
|
endif::external_title[]
|
||||||
|
|
||||||
|
== I just upgraded, and ...
|
||||||
|
You have read link:UPGRADING[UPGRADING] in the base directory of the distribution,
|
||||||
|
right?
|
||||||
|
|
||||||
|
If not, go read it now, then come back to this file if your
|
||||||
|
question wasn't answered in there.
|
||||||
|
|
||||||
|
== upsstats says 'Error: can't open template file (upsstats.html)'.
|
||||||
|
Go into your configuration path (/usr/local/ups/etc by default) and
|
||||||
|
copy the sample template files over to their real names. The sample
|
||||||
|
template files are installed with 'make install' and can
|
||||||
|
also be found inside the source distribution in the conf directory.
|
||||||
|
|
||||||
|
== upsmon fails the login and says 'username required' now.
|
||||||
|
Go read the link:UPGRADING[UPGRADING] file again.
|
||||||
|
|
||||||
|
== My UPS driver now says it's 'broken', and won't start. What now?
|
||||||
|
Or a variation like...
|
||||||
|
|
||||||
|
== My favorite UPS driver disappeared after an upgrade. What now?
|
||||||
|
|
||||||
|
Drivers are occasionally removed from the tree if they are no longer
|
||||||
|
receiving maintenance, or sometimes renamed to better reflect their
|
||||||
|
hardware support scope or replaced by a more generic driver.
|
||||||
|
There have been several architectural changes to the driver code
|
||||||
|
in recent times, and drivers which were not converted by someone
|
||||||
|
are eventually dropped.
|
||||||
|
|
||||||
|
This is called progress. We do this in order to avoid a situation
|
||||||
|
where someone believes that a driver is being maintained when it is
|
||||||
|
actually rotting slowly in the tree. It also keeps the tree free of
|
||||||
|
old compatibility hacks for code that nobody actually uses anyway.
|
||||||
|
|
||||||
|
To get a driver back into current releases, you need to convert it
|
||||||
|
yourself or get someone to do it for you. This is not difficult.
|
||||||
|
The hardest part of any driver is decoding the protocol, and that's
|
||||||
|
already been done in the old version.
|
||||||
|
|
||||||
|
== My UPS driver program won't work. I'm starting it as root, and root owns the device, so what's the problem?
|
||||||
|
|
||||||
|
*Answer 1*
|
||||||
|
|
||||||
|
The drivers drop root privileges long before the serial port is
|
||||||
|
opened. You'll need to change the permissions on that port so that
|
||||||
|
their new user id can access it. Normally this is "nobody", but it
|
||||||
|
may be changed at compile-time by using configure --with-user.
|
||||||
|
|
||||||
|
Read the error message. If you have a permissions mismatch, then
|
||||||
|
you'll see something like this:
|
||||||
|
|
||||||
|
Network UPS Tools - APC Smart protocol driver 0.60 (1.1.7)
|
||||||
|
This program is currently running as youruid (UID 1234)
|
||||||
|
/dev/ttyS2 is owned by user root (UID 0), mode 0600
|
||||||
|
Change the port name, or fix the permissions or ownership
|
||||||
|
of /dev/ttyS2 and try again.
|
||||||
|
Unable to open /dev/ttyS2: Permission denied
|
||||||
|
|
||||||
|
Now is a good time to point out that using "nobody" is a bad idea,
|
||||||
|
since it's a hack for NFS access. You should create a new role
|
||||||
|
account (perhaps called "ups" or "nut"), and use that instead.
|
||||||
|
|
||||||
|
Also, scroll down to the "security domains" question to see an
|
||||||
|
even better way of restricting privileged operations. Neither the
|
||||||
|
drivers nor upsd ever need root powers, and that answer tells you
|
||||||
|
how to make it work.
|
||||||
|
|
||||||
|
*Answer 2*
|
||||||
|
|
||||||
|
You can also specify a user with "user=" in the global part of
|
||||||
|
ups.conf. Just define it before any of your [sections]:
|
||||||
|
|
||||||
|
user = nut
|
||||||
|
|
||||||
|
[myups]
|
||||||
|
driver = mge-shut
|
||||||
|
port = /dev/ttyS0
|
||||||
|
|
||||||
|
== upsc, upsstats, and the other clients say 'access denied'. The device communication port (serial, USB or network) permissions are fine, so what gives?
|
||||||
|
|
||||||
|
In this case, "access denied" means the access to upsd, not the device
|
||||||
|
communication port. You're being denied since the system has no
|
||||||
|
permission to speak to upsd according to the access controls.
|
||||||
|
|
||||||
|
There can be various reasons. To fix it, check:
|
||||||
|
|
||||||
|
- the LISTEN directive in upsd.conf. It should allow your local or remote
|
||||||
|
access method,
|
||||||
|
- your firewall rules. Port 3493/tcp must be opened to incoming connexions,
|
||||||
|
- your tcp-wrappers configuration (hosts.allow and hosts.deny).
|
||||||
|
|
||||||
|
Refer to the upsd(8) and upsd.conf(5) manpages for more information.
|
||||||
|
|
||||||
|
== I have an APC Smart-UPS connected with a grey APC serial cable and it won't work.
|
||||||
|
|
||||||
|
The Back-UPS type in the genericups driver works but then I don't get to use
|
||||||
|
all the nifty features in there. Why doesn't the right driver work?
|
||||||
|
|
||||||
|
The problem lies in your choice of cable. APC's grey cables
|
||||||
|
generally only do "dumb" signalling - very basic yes/no info about
|
||||||
|
the battery and line status. While that is sufficient to detect a
|
||||||
|
low battery condition while on battery, you miss out on all the
|
||||||
|
goodies that you paid for.
|
||||||
|
|
||||||
|
Note that the 940-0095B happens to be a grey cable, but it is actually
|
||||||
|
a dual mode cable and can be used in smart mode. If you have
|
||||||
|
this cable, you need to edit your ups.conf to look like this:
|
||||||
|
|
||||||
|
[myups]
|
||||||
|
driver = apcsmart
|
||||||
|
port = /dev/whatever
|
||||||
|
cable = 940-0095B
|
||||||
|
|
||||||
|
All other grey cables from APC are assumed to be "dumb".
|
||||||
|
|
||||||
|
If your grey cable isn't the 940-0095B, the solution is to dump that
|
||||||
|
cable and find one that supports APC's "smart" signalling. Typically
|
||||||
|
these come with the UPS and are black. If your smart cable has
|
||||||
|
wandered off, one can be built rather easily with some connectors and
|
||||||
|
cable - there's no fancy wiring or resistors.
|
||||||
|
|
||||||
|
See this URL for a handy diagram: http://www.networkupstools.org/cables/940-0024C.jpg
|
||||||
|
|
||||||
|
There is also a text version of that diagram in the docs/cables
|
||||||
|
directory of the NUT source distribution. Either one should allow
|
||||||
|
you to build a good clone of APC's 940-0024C cable.
|
||||||
|
|
||||||
|
There are simpler solutions involving 3 wires that work just fine
|
||||||
|
too, but Powerchute won't find the loopback DTR-DCD and RTS-CTS and
|
||||||
|
will be annoyed. If you don't ever plan to use Powerchute, 3 wires
|
||||||
|
(RxD, TxD, GND) are sufficient.
|
||||||
|
|
||||||
|
It should also be noted that the genericups driver has no way to
|
||||||
|
detect the UPS, so it will fire up quite happily if it can open the
|
||||||
|
serial port. Merely having it start up is not necessarily an
|
||||||
|
indication of success. You should start it and then check the
|
||||||
|
status with upsc or similar to be sure that it's reading the
|
||||||
|
hardware properly.
|
||||||
|
|
||||||
|
== Why doesn't upsd implement the functionality of upsmon? I have to run THREE programs to monitor my UPS!
|
||||||
|
|
||||||
|
*Answer 1*
|
||||||
|
|
||||||
|
I try to follow the "tool for the job" philosophy. It may mean
|
||||||
|
more programs running, but the flexibility you get is usually
|
||||||
|
worth it.
|
||||||
|
|
||||||
|
Yes, the machine with the UPS attached will generally have 3
|
||||||
|
processes (driver, upsd, upsmon) running, but this design allows a
|
||||||
|
much bigger setup. Imagine a data room with a bunch of machines
|
||||||
|
all drawing power from the same UPS. The rest of them just run
|
||||||
|
upsmon.
|
||||||
|
|
||||||
|
Besides, if upsmon were rolled into upsd, upsd would get even
|
||||||
|
bigger than it is now. You'd have one less process, but the
|
||||||
|
RAM consumption would be pretty close to now.
|
||||||
|
|
||||||
|
See data-room.txt for more configuration ideas and explanations.
|
||||||
|
|
||||||
|
*Answer 2*
|
||||||
|
|
||||||
|
If this really bothers you, roll up your sleeves and use the
|
||||||
|
sockdebug code to write a "upsmon" type program that sits on top of
|
||||||
|
the state sockets. It won't work over the network, but it means
|
||||||
|
you don't need upsd. It also means only one host can monitor the
|
||||||
|
UPS.
|
||||||
|
|
||||||
|
This is also a good option to consider if you can't use networked
|
||||||
|
monitoring code for security or safety reasons.
|
||||||
|
|
||||||
|
See ideas.txt for more on this and other related topics.
|
||||||
|
|
||||||
|
== Why isn't upssched part of upsmon?
|
||||||
|
|
||||||
|
Most users will never have any reason to use upssched. It's
|
||||||
|
complicated, and getting it right for your situation can be tricky.
|
||||||
|
Having it live in a separate program saves resources and lets most
|
||||||
|
people avoid it completely.
|
||||||
|
|
||||||
|
It is also coherent with the answer to the previous question.
|
||||||
|
|
||||||
|
== Why doesn't upsmon send a SIGPWR signal to init so it can deal with power events?
|
||||||
|
|
||||||
|
*Answer 1*
|
||||||
|
|
||||||
|
New versions of the init man page taken from the sysvinit package
|
||||||
|
are saying that usage of SIGPWR is discouraged, since /dev/initctl
|
||||||
|
control channel is the preferred way of communication.
|
||||||
|
|
||||||
|
*Answer 2*
|
||||||
|
|
||||||
|
The name of the game is portability. Not everyone's init handles
|
||||||
|
that kind of signalling gracefully. What's more, some admins
|
||||||
|
might want to do things differently even if they have that kind of
|
||||||
|
init running.
|
||||||
|
|
||||||
|
So, to be compatible, upsmon just invokes a shell command. If you
|
||||||
|
want to use init's SIGPWR stuff, just put the right "kill" line in
|
||||||
|
a shell script and make upsmon call it. Everyone wins.
|
||||||
|
|
||||||
|
== Why won't bestups talk to my Best Fortress UPS?
|
||||||
|
|
||||||
|
There are at least two different protocols being used for hardware
|
||||||
|
with very similar names. The bestups driver tends to support the
|
||||||
|
units built around the newer "PhoenixTec" protocol.
|
||||||
|
|
||||||
|
Previous releases of this software included a driver called
|
||||||
|
bestfortress which supported the older Best hardware. See the
|
||||||
|
earlier entries about updating old drivers which have been removed
|
||||||
|
from the tree.
|
||||||
|
|
||||||
|
== What's this about 'data stale'?
|
||||||
|
|
||||||
|
It means your UPS driver hasn't updated things in a little while.
|
||||||
|
upsd refuses to serve up data that isn't fresh, so you get the
|
||||||
|
errors about staleness.
|
||||||
|
|
||||||
|
If this happens to you, make sure your driver is still running.
|
||||||
|
Also look at the syslog. Sometimes the driver loses the connection
|
||||||
|
to the UPS, and that will also make the data go stale.
|
||||||
|
|
||||||
|
Note: some very slow machines have trouble keeping up with the
|
||||||
|
serial ports during periods of extreme load. My old 486 used to
|
||||||
|
flip between "stale" and "OK" while running backups.
|
||||||
|
|
||||||
|
If this happens a lot, you might consider cranking up DEADTIME
|
||||||
|
in the upsmon.conf to suppress some of the warnings for shorter
|
||||||
|
intervals. Use caution when adjusting this number, since it
|
||||||
|
directly affects how long you run on battery without knowing
|
||||||
|
what's going on with the UPS.
|
||||||
|
|
||||||
|
Note: some drivers occasionally need more time to update than the
|
||||||
|
default value of MAXAGE (in upsd.conf) allows. As a result, they
|
||||||
|
are temporarily marked stale even though everything is fine. This
|
||||||
|
can happen with MGE Ellipse equipment - see the mge-shut man page.
|
||||||
|
In such cases, you can raise the value of MAXAGE to avoid these
|
||||||
|
warnings; try a value like 25 or 30.
|
||||||
|
|
||||||
|
== Why do the client programs say 'Driver not connected' when I try to run them?
|
||||||
|
|
||||||
|
This means that upsd can't connect to the driver for some reason.
|
||||||
|
Your ups.conf entry might be wrong, or the driver might not be
|
||||||
|
running. Maybe your state path is not configured properly.
|
||||||
|
|
||||||
|
Check your syslog. upsd will complain regularly if it can't
|
||||||
|
connect to a driver, and it should say why it can't connect.
|
||||||
|
|
||||||
|
Note: if you jumped in with both feet and didn't follow the INSTALL
|
||||||
|
document, you probably started upsd by itself. You have to run
|
||||||
|
'upsdrvctl start' to start the drivers after configuring ups.conf.
|
||||||
|
|
||||||
|
== Everything works perfectly during the shutdown, and the UPS comes back on, but my system stays off. What's happening?
|
||||||
|
|
||||||
|
Assuming you don't have the problem in the next question, then you
|
||||||
|
probably have an ATX motherboard, have APM or ACPI enabled in your
|
||||||
|
kernel (assuming Linux here), and are reaching the 'halt' at the
|
||||||
|
bottom of your shutdown scripts.
|
||||||
|
|
||||||
|
Your machine obeys and shuts down, and stays down, since it
|
||||||
|
remembers the 'last state' when the UPS restarts.
|
||||||
|
|
||||||
|
One solution is to change your shutdown scripts so you never reach
|
||||||
|
that point. You *want* the system to die without reaching the
|
||||||
|
part where the kernel tells it to shut down. A possible script
|
||||||
|
might look like this:
|
||||||
|
|
||||||
|
# other shutdown stuff here (mount -o remount,ro ...)
|
||||||
|
|
||||||
|
if (test -f /etc/killpower)
|
||||||
|
then
|
||||||
|
/usr/local/ups/bin/upsdrvctl shutdown
|
||||||
|
|
||||||
|
sleep 600 # this should never return
|
||||||
|
|
||||||
|
# uh oh, we never got shut down! (power race?)
|
||||||
|
reboot
|
||||||
|
fi
|
||||||
|
|
||||||
|
halt -p
|
||||||
|
|
||||||
|
The other solution is to change your BIOS setting to "always power
|
||||||
|
on" instead of "last state", assuming that's possible.
|
||||||
|
|
||||||
|
== My system has an ATX power supply. It will power off just fine, but it doesn't turn back on. What can I do to fix this?
|
||||||
|
|
||||||
|
This depends on how clueful your motherboard manufacturer is, and
|
||||||
|
isn't a matter of the OS. You have to do one of the following
|
||||||
|
things depending on what's supported:
|
||||||
|
|
||||||
|
- Set a jumper on the motherboard that means "return after outage"
|
||||||
|
- Set something in the BIOS that says "power up after power failure"
|
||||||
|
- Try using something (like a capacitor) across the power button
|
||||||
|
to "push" it for you - this might not work if it needs a delay
|
||||||
|
- Hack the cable between the power supply and the motherboard to fool
|
||||||
|
it into powering up whenever line power is present
|
||||||
|
- Teach a monkey to watch the machine and press the power button
|
||||||
|
when the outage is over.
|
||||||
|
|
||||||
|
This might work, but it creates high produce bills.
|
||||||
|
|
||||||
|
If you can't use one of the first two options, give the board to
|
||||||
|
an enemy. Let them worry about it.
|
||||||
|
|
||||||
|
== My PowerMac G4 won't power back up by itself (into Linux) after the UPS shuts down. What can I do about this?
|
||||||
|
|
||||||
|
*Answer 1*
|
||||||
|
|
||||||
|
This is about the same situation as the ATX question above, only
|
||||||
|
worse. Earlier Macs apparently supported a hack where you could
|
||||||
|
cat some magic characters at /dev/adb to enable "server mode".
|
||||||
|
This would instruct the system to reboot while unattended.
|
||||||
|
|
||||||
|
From Usenet post <6boftzxz51.fsf@ecc-office.sp.cs.cmu.edu>:
|
||||||
|
|
||||||
|
# Send packet over the ADB bus to the PowerMac CUDA chip
|
||||||
|
# telling it to reboot automatically when power is restored
|
||||||
|
# after a power failure.
|
||||||
|
|
||||||
|
cat /etc/local/autoboot.adb > /dev/adb
|
||||||
|
|
||||||
|
autoboot.adb contains these three bytes (in hex): 01 13 01
|
||||||
|
|
||||||
|
Unfortunately, the hardware has evolved and there is no good
|
||||||
|
equivalent for this hack on today's systems.
|
||||||
|
|
||||||
|
If you find out how to do this, please send me some mail, since
|
||||||
|
this affects one of my systems and my stop-gap solution is getting
|
||||||
|
cranky.
|
||||||
|
|
||||||
|
Note: this question has been in the FAQ for over a year and
|
||||||
|
there's still no answer. Let me guess: everyone who runs a server
|
||||||
|
on Mac hardware has a team of trained monkeys, and feeds them
|
||||||
|
by growing bananas in the tropical environment formed by waste heat
|
||||||
|
from the equipment.
|
||||||
|
|
||||||
|
The rest of us are still waiting for the answer. Booting into the
|
||||||
|
Mac OS to frob the "file server" panel is not an acceptable
|
||||||
|
solution.
|
||||||
|
|
||||||
|
*Answer 2*
|
||||||
|
|
||||||
|
If you're on OS X, this is relatively simple to fix. Go to system
|
||||||
|
preferences, click on energy saver, click on the options tab, check
|
||||||
|
"Restart automatically after a power failure".
|
||||||
|
|
||||||
|
If you're on some other OS, hope they've figured out how to duplicate
|
||||||
|
the above in a non-simian manner.
|
||||||
|
|
||||||
|
== I want to keep the drivers and upsd in their own security domains. How can this be accomplished?
|
||||||
|
|
||||||
|
Using a few role accounts and a common group, you can limit access
|
||||||
|
to resources such as the serial port(s) leading to the UPS
|
||||||
|
hardware.
|
||||||
|
|
||||||
|
This is just an example. Change the values to suit your systems.
|
||||||
|
|
||||||
|
- Create a user called 'nutdev' and another called 'nutsrv'. Put
|
||||||
|
them both in a group called 'nut'.
|
||||||
|
|
||||||
|
- Change the owner of any serial ports that will be used to nutdev,
|
||||||
|
and set the mode to 0600. Then change the ownership of your state
|
||||||
|
directory (usually /var/state/ups) to nutdev.nut.
|
||||||
|
|
||||||
|
For my development system this yields the following /dev entries:
|
||||||
|
|
||||||
|
0 crw------- 1 nutdev tty 4, 64 Sep 3 17:11 /dev/ttyS0
|
||||||
|
0 crw------- 1 nutdev tty 4, 65 Sep 3 17:11 /dev/ttyS1
|
||||||
|
|
||||||
|
- Switch to root, then start the drivers:
|
||||||
|
|
||||||
|
# /usr/local/ups/bin/upsdrvctl -u nutdev start
|
||||||
|
|
||||||
|
- The listing for /var/state/ups then looks like this:
|
||||||
|
|
||||||
|
4 drwxrwx--- 2 nutdev nut 4096 Aug 20 18:37 .
|
||||||
|
4 drwxr-xr-x 4 root root 4096 May 14 21:20 ..
|
||||||
|
4 srw-rw---- 1 nutdev nut 0 Sep 3 17:10 apcsmart-ups1
|
||||||
|
4 srw-rw---- 1 nutdev nut 0 Sep 3 17:10 blazer_ser-ups2
|
||||||
|
|
||||||
|
You may have to remove old socket or state files first if you are
|
||||||
|
changing to this security scheme from an older version. The drivers
|
||||||
|
will create new files with the right owners and modes.
|
||||||
|
|
||||||
|
Note that /var/state/ups is group writable since upsd will
|
||||||
|
place the upsd.pid file here.
|
||||||
|
|
||||||
|
You may have to change the groups of upsd.conf and upsd.users to
|
||||||
|
make them readable. These files should not be owned by nutsrv,
|
||||||
|
since someone could compromise the daemon and change the config
|
||||||
|
files. Instead, put nutsrv in a group ("nut" in this example), then
|
||||||
|
make the files owned by root.nut, with mode 0640.
|
||||||
|
|
||||||
|
Once the config files are ready, start upsd:
|
||||||
|
|
||||||
|
# /usr/local/ups/sbin/upsd -u nutsrv
|
||||||
|
|
||||||
|
Check your syslog to be sure everything's happy, then be sure to
|
||||||
|
update your startup scripts so it uses this procedure on your next
|
||||||
|
boot.
|
||||||
|
|
||||||
|
If you like this, you'll probably also find the chroot process to
|
||||||
|
be useful and interesting. See security.txt for more details.
|
||||||
|
|
||||||
|
== What's the point of that 'security domains' concept above?
|
||||||
|
|
||||||
|
The point is limiting your losses. If someone should happen to
|
||||||
|
break into upsd in that environment, they should only gain access
|
||||||
|
to that one user account. Direct access to the serial device is
|
||||||
|
not possible, since that is owned by another user.
|
||||||
|
|
||||||
|
There is also the possibility of running the drivers and upsd in a
|
||||||
|
chroot jail. See the chroot.txt provided in the source
|
||||||
|
distribution for an example implementation.
|
||||||
|
|
||||||
|
Why give would-be vandals any sort of help?
|
||||||
|
|
||||||
|
Put it this way - I *wrote* good chunks of this stuff, and I still
|
||||||
|
run the programs this way locally. You should definitely consider
|
||||||
|
using this technique.
|
||||||
|
|
||||||
|
== How can I make upsmon shut down my system after some fixed interval?
|
||||||
|
|
||||||
|
You probably don't want to do this, since it doesn't maximize your
|
||||||
|
runtime on battery. Assuming you have a good reason for it (see
|
||||||
|
the next entry), then look at scheduling.txt or the upssched(8) man
|
||||||
|
page for some ideas.
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
TODO: figure out how to link to the upssched man page above.
|
||||||
|
/////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
== Why doesn't upsmon shut down my system? I pulled the plug and nothing happened.
|
||||||
|
|
||||||
|
Wait. upsmon doesn't consider a UPS to be critical until it's both
|
||||||
|
'on battery' and 'low battery' at the same time. This is by design.
|
||||||
|
Nearly every UPS supports the notion of detecting the low battery
|
||||||
|
all by itself. When the voltage drops below a certain point, it
|
||||||
|
_will_ let you know about it.
|
||||||
|
|
||||||
|
If your system has a really complicated shutdown procedure, you
|
||||||
|
might need to shut down before the UPS raises the low battery flag.
|
||||||
|
For most users, however, the default behavior is adequate.
|
||||||
|
|
||||||
|
Ask yourself this: why buy a nice big UPS with the matching battery
|
||||||
|
and corresponding runtime and then shutdown early? If anything, I'd
|
||||||
|
rather have a few more minutes running on battery during which the
|
||||||
|
power might return. Once the power's back, it's business as usual
|
||||||
|
with no visible interruption in service.
|
||||||
|
|
||||||
|
If you purposely shut down early, you guarantee an interruption in
|
||||||
|
service by bringing down the box.
|
||||||
|
|
||||||
|
See upssched.txt for information on how you can shutdown early if
|
||||||
|
this is what you really want to do.
|
||||||
|
|
||||||
|
== The CGI programs report 'access to that host is not authorized' - what's going on?
|
||||||
|
|
||||||
|
Those programs need to see a host in your hosts.conf before they
|
||||||
|
will attempt communications. This keeps people from feeding it
|
||||||
|
random "host=" settings, which would annoy others with outgoing
|
||||||
|
connection attempts from your system.
|
||||||
|
|
||||||
|
If your hosts.conf turns out to be configured correctly with
|
||||||
|
MONITOR entries and all that, check the permissions. Your web
|
||||||
|
server may be running the CGI programs as a user that can't read
|
||||||
|
the file.
|
||||||
|
|
||||||
|
If you run your web server in a chroot jail, make sure the programs
|
||||||
|
can still read hosts.conf. You may have to copy it into the jail
|
||||||
|
for this to work. If you do that, make sure it's not writable by
|
||||||
|
any of the user accounts which run inside the jail.
|
||||||
|
|
||||||
|
== upsd is running, so why can't I connect to it?
|
||||||
|
|
||||||
|
Assuming you haven't changed the TCP port number on the command line
|
||||||
|
or at compile-time, then you probably have some sort of firewall
|
||||||
|
blocking the connection.
|
||||||
|
|
||||||
|
upsd listens on TCP port 3493 by default.
|
||||||
|
|
||||||
|
== How do you make upsmon reload the config file?
|
||||||
|
|
||||||
|
Or a variation like...
|
||||||
|
|
||||||
|
== How do you make upsd reload the config file?
|
||||||
|
|
||||||
|
Either find the pid of the background process and send it a SIGHUP,
|
||||||
|
or just start it again with '-c reload'.
|
||||||
|
|
||||||
|
If you send the signals yourself instead of using -c, be sure you
|
||||||
|
hit the right process. There are usually two upsmons, and you
|
||||||
|
should only send signals to one of them. To be safe, read the pid
|
||||||
|
file.
|
||||||
|
|
||||||
|
== I just bought a new WhizBang UPS that has a USB connector. How do I monitor it?
|
||||||
|
|
||||||
|
There are several driver to support USB models.
|
||||||
|
|
||||||
|
- usbhid-ups supports various manufacturers complying to the HID standard,
|
||||||
|
- tripplite_usb supports various Tripp-Lite units,
|
||||||
|
- bcmxcp_usb supports various Powerware units,
|
||||||
|
- blazer_usb supports various manufacturers that use the Megatec / Q1 protocol.
|
||||||
|
|
||||||
|
Refer to the 'driver-name' (8) manpage for more information.
|
||||||
|
|
||||||
|
== What is this usbhid-ups (formerly newhidups) about?
|
||||||
|
|
||||||
|
The basic USB UPS support was done until NUT 2.2 using hidups. To allow
|
||||||
|
a wider support accross platforms for USB/HID compliant devices,
|
||||||
|
usbhid-ups driver uses libusb (which is available for a wide range of
|
||||||
|
operating systems) and libhid (currently, a modified internal version
|
||||||
|
of it).
|
||||||
|
|
||||||
|
As of NUT 2.2, usbhid-ups completely replaces the legacy hidups driver
|
||||||
|
and provide support for various manufacturers. At that time, it will
|
||||||
|
be renamed to usbhid-ups.
|
||||||
|
|
||||||
|
usbhid-ups is built automatically if possible (libusb development files
|
||||||
|
need to be installed) and installed by the "make install" command.
|
||||||
|
|
||||||
|
== Why doesn't my package work?
|
||||||
|
|
||||||
|
Or a variation like...
|
||||||
|
|
||||||
|
== I can't run this because there's no package for it. Why isn't this in a package yet?
|
||||||
|
|
||||||
|
Sorry, can't help you there. All official releases are source code
|
||||||
|
and are posted on http://www.networkupstools.org/ along with PGP
|
||||||
|
signatures for verification.
|
||||||
|
|
||||||
|
This means all packages have been built by a third party. If you
|
||||||
|
have an issue that's related to packaging, you will need to seek
|
||||||
|
help with whoever built it for you.
|
||||||
|
|
||||||
|
== Why are there two copies of upsmon running?
|
||||||
|
|
||||||
|
It's not really two complete copies if your OS forks efficiently.
|
||||||
|
|
||||||
|
By default, upsmon runs most of the grunt work as an unprivileged
|
||||||
|
user and keeps a stub process around with root powers that can
|
||||||
|
only shut down the system when necessary. This should make it much
|
||||||
|
harder to gain root in the event a hole is ever discovered in
|
||||||
|
upsmon.
|
||||||
|
|
||||||
|
If this really bothers you and you like running lots of code as
|
||||||
|
root, start upsmon with -p and it will go back to being one big
|
||||||
|
process. This is not recommended, so don't blame us if something
|
||||||
|
bad happens in this mode.
|
||||||
|
|
||||||
|
== I have 'some problem' with 'some old version' ...
|
||||||
|
|
||||||
|
Get the latest stable release, and see if it still happens. If it
|
||||||
|
goes away, it means someone else reported it and got it fixed a
|
||||||
|
long time ago.
|
||||||
|
|
||||||
|
If that doesn't work, try the latest development version.
|
||||||
|
|
||||||
|
If your problem is STILL there, then contact the mailing lists.
|
||||||
|
|
||||||
|
NOTE: check the release date on the version you have. If it's more
|
||||||
|
than about 6 months old, there's probably a newer stable tree
|
||||||
|
version out there.
|
||||||
|
|
||||||
|
== Do I have to use a serial connection to monitor the UPS? What about direct network connections (SNMP or otherwise)?
|
||||||
|
|
||||||
|
No. NUT currently support USB communication through several drivers,
|
||||||
|
and also SNMP and XML/HTTP (Eaton and MGE) communications.
|
||||||
|
|
||||||
|
Since NUT is very extensible, support for a new communication bus can be added
|
||||||
|
easily.
|
||||||
|
|
||||||
|
Any time there is a gap in features, it's usually because the
|
||||||
|
group of people who own that hardware and the group of people who
|
||||||
|
write code don't overlap. The fix is to make them overlap -
|
||||||
|
turn an owner into a developer or vice-versa.
|
||||||
|
|
||||||
|
== What happened to the patch I sent?
|
||||||
|
|
||||||
|
If a release goes by and your patch hasn't been included, it was
|
||||||
|
probably dropped. There can be a lot of patches waiting for
|
||||||
|
inclusion at some points, and occasionally some have to be
|
||||||
|
rejected.
|
||||||
|
|
||||||
|
Design issues or severe coding style problems can be the reason
|
||||||
|
for this. I try to point out what the problems are, but there are
|
||||||
|
limits. See developers.txt for some pointers on submitting
|
||||||
|
patches.
|
||||||
|
|
||||||
|
Sometimes patches are put on hold due to a feature freeze. If it
|
||||||
|
doesn't show up once the new version opens up, send it again.
|
||||||
|
|
||||||
|
== I'm not much of a programmer. How can I help?
|
||||||
|
|
||||||
|
There's always work to be done outside of the realm of code bashing.
|
||||||
|
Documentation might not always be so clear. A user's perspective
|
||||||
|
is sometimes needed to appreciate this. Bug reports on a project's
|
||||||
|
documentation are just as valuable as those for the actual source.
|
||||||
|
|
||||||
|
Fielding questions on the mailing lists is also helpful. This
|
||||||
|
lets other people to focus on coding issues while allowing the
|
||||||
|
original poster to get some information at the same time. It's
|
||||||
|
quite a relief to open that mailbox and find that someone else
|
||||||
|
has already handled it successfully.
|
||||||
|
|
||||||
|
== I replaced the battery in my APC Smart-UPS and now it thinks the battery is low all the time. How do you fix this?
|
||||||
|
|
||||||
|
Or a variation like...
|
||||||
|
|
||||||
|
== My APC UPS keeps reporting 'OL LB', even after it's been charging for many hours. What can I do about this?
|
||||||
|
|
||||||
|
This happened to me, and some other people too. The combination of
|
||||||
|
our experiences should prove useful to you.
|
||||||
|
|
||||||
|
First, you need to realize that the UPS apparently stores data about
|
||||||
|
the battery, load, and runtime. After replacing the battery, it
|
||||||
|
needs to be clued in to the new situation. If the traditional
|
||||||
|
runtime calibration doesn't work, you have to try something a
|
||||||
|
little more drastic.
|
||||||
|
|
||||||
|
You need to *completely* drain the UPS while it has a good ground.
|
||||||
|
This means you can't just pull the plug. You also have to
|
||||||
|
disconnect it from the computer so this software won't shut it
|
||||||
|
down.
|
||||||
|
|
||||||
|
The easiest way to do this is to first unplug your computer(s) from
|
||||||
|
it, and plug in a token load like a lamp. Also, move the UPS to a
|
||||||
|
power strip that doesn't switch the ground line or an outlet that
|
||||||
|
you can switch off at your panel.
|
||||||
|
|
||||||
|
Once the UPS is up at 100% charge (this is important), disconnect
|
||||||
|
the power. It _must_ remain connected to the ground, or the
|
||||||
|
results may not be accurate. Ignore the sounds it makes, and go
|
||||||
|
away until it's done. Don't do anything to the front panel while
|
||||||
|
this is happening.
|
||||||
|
|
||||||
|
After all of this, put things back the way they should be and let
|
||||||
|
it charge up. You should find that it again gives reasonable
|
||||||
|
values and behavior, as it was when it was new.
|
||||||
|
|
||||||
|
Thanks to Matthew Dharm for helping us nail down this procedure.
|
||||||
|
|
||||||
|
== upsstats returns temperatures in Celsius. I like Fahrenheit. Where's the config file to switch it back?
|
||||||
|
|
||||||
|
Temperature scales are handled by the template files, so edit your
|
||||||
|
upsstats.html and change it from TEMPC to TEMPF.
|
||||||
|
|
||||||
|
== Why is the mailing list ignoring me?
|
||||||
|
|
||||||
|
You probably asked a question that's answered in this FAQ or
|
||||||
|
somewhere else in the documentation and nobody wants to quote it
|
||||||
|
for you.
|
||||||
|
|
||||||
|
Convincing the other subscribers that you've actually read down this
|
||||||
|
far might be useful. You might mention "queequeg" for better results.
|
||||||
|
|
||||||
|
This URL may also be helpful:
|
||||||
|
|
||||||
|
http://www.catb.org/~esr/faqs/smart-questions.html
|
||||||
|
|
||||||
|
== I found some information about another kind of UPS protocol you don't support yet, but I don't know what to do with it. Can you help?
|
||||||
|
|
||||||
|
If you're not a programmer, you can still help others by making
|
||||||
|
that protocol available. You might host the document somewhere and
|
||||||
|
send the URL to one of the mailing lists.
|
||||||
|
|
||||||
|
== How can you answer questions to situations that nobody's encountered yet? Isn't this a frequently asked questions file?
|
||||||
|
|
||||||
|
*Answer 1*
|
||||||
|
|
||||||
|
It's a kind of Magic.
|
||||||
|
|
||||||
|
*Answer 2*
|
||||||
|
|
||||||
|
It's both that and a frequently *anticipated* questions file, too.
|
||||||
|
|
||||||
|
The idea is to write it up in here so that nobody asks the mailing
|
||||||
|
list when it finally does get released.
|
||||||
|
|
||||||
|
== My UPS powers up immediately after a power failure instead of waiting for the batteries to recharge!
|
||||||
|
|
||||||
|
You can rig up a little hack to handle this issue in software.
|
||||||
|
|
||||||
|
Essentially, you need to test for the POWERDOWNFLAG in your *startup* scripts
|
||||||
|
while the filesystems are still read-only. If it's there, you know your last
|
||||||
|
shutdown was caused by a power failure and the UPS battery is probably still
|
||||||
|
quite weak.
|
||||||
|
|
||||||
|
In this situation, your best bet is to sleep it off. Pausing in your startup
|
||||||
|
script to let the batteries recharge with the filesystems in a safe state is
|
||||||
|
recommended. This way, if the power goes out again, you won't face a situation
|
||||||
|
where there's not enough battery capacity left for upsmon to do its thing.
|
||||||
|
|
||||||
|
Exactly how long to wait is a function of your UPS hardware, and will require
|
||||||
|
careful testing.
|
||||||
|
|
||||||
|
If this is too evil for you, buy another kind of UPS that will either wait for a
|
||||||
|
minimum amount of charge, a minimum amount of time, or both.
|
||||||
|
|
||||||
|
== I'm facing a power race
|
||||||
|
Or a variation like...
|
||||||
|
|
||||||
|
== The power came back during the shutdown, but before the UPS power off. Now the UPS does not reboot, and my computer stays off. How can I fix that?
|
||||||
|
|
||||||
|
There is a situation where the power may return during the shutdown process.
|
||||||
|
This is known as a race. Here's how we handle it.
|
||||||
|
|
||||||
|
"Smart" UPSes typically handle this by using a command that forces the UPS to
|
||||||
|
power the load off and back on. This way, you are assured that the systems will
|
||||||
|
restart even if the power returns at the worst possible moment.
|
||||||
|
|
||||||
|
Contact closure units (ala genericups), on the other hand, have the potential
|
||||||
|
for a race when feeding multiple systems. This is due to the design of most
|
||||||
|
contact closure UPSes. Typically, the "kill power" line only functions when
|
||||||
|
running on battery. As a result, if the line power returns during the shutdown
|
||||||
|
process, there is no way to power down the load.
|
||||||
|
|
||||||
|
The workaround is to force your systems to reboot after some interval. This way,
|
||||||
|
they won't be stuck in the halted state with the UPS running on line power.
|
||||||
|
|
||||||
|
Implement this by modifying your shutdown script like this:
|
||||||
|
|
||||||
|
if (test -f /etc/killpower)
|
||||||
|
then
|
||||||
|
/usr/local/ups/bin/upsdrvctl shutdown
|
||||||
|
|
||||||
|
sleep 120
|
||||||
|
|
||||||
|
# uh oh, we never got shut down! (power race?)
|
||||||
|
reboot
|
||||||
|
fi
|
113
docs/Makefile.am
|
@ -1,13 +1,108 @@
|
||||||
# nothing to build here, but still need a Makefile to define which
|
SHARED_DEPS = nut-names.txt asciidoc.conf
|
||||||
# files to distribute
|
|
||||||
|
|
||||||
EXTRA_DIST = acpi.txt big-servers.txt chroot.txt \
|
IMAGE_FILES = images/asciidoc.png \
|
||||||
commands.txt config-files.txt configure.txt contact-closure.txt \
|
images/eaton-logo.png \
|
||||||
data-room.txt design.txt developers.txt FAQ hid-subdrivers.txt \
|
images/nut_layering.png \
|
||||||
ideas.txt macros.txt megatec.txt new-drivers.txt new-names.txt \
|
images/note.png \
|
||||||
nut-hal.txt osd-notify.txt \
|
images/warning.png \
|
||||||
pager.txt powersaving.txt protocol.txt README shutdown.txt snmp.txt \
|
images/blue-arrow.png \
|
||||||
sock-protocol.txt ssl.txt upssched.txt cables/apc-rs500-serial.txt \
|
images/simple.png \
|
||||||
|
images/advanced.png \
|
||||||
|
images/bigbox.png \
|
||||||
|
images/bizarre.png \
|
||||||
|
images/old-cgi.png
|
||||||
|
|
||||||
|
USER_MANUAL_DEPS = acknowledgements.txt cables.txt config-notes.txt \
|
||||||
|
configure.txt download.txt documentation.txt features.txt history.txt \
|
||||||
|
outlets.txt scheduling.txt security.txt support.txt user-manual.txt \
|
||||||
|
stable-hcl.txt
|
||||||
|
|
||||||
|
DEVELOPER_GUIDE_DEPS = contact-closure.txt design.txt developers.txt \
|
||||||
|
developer-guide.txt hid-subdrivers.txt macros.txt \
|
||||||
|
new-clients.txt new-drivers.txt net-protocol.txt sock-protocol.txt
|
||||||
|
|
||||||
|
CABLES_DEPS = cables/apc-rs500-serial.txt \
|
||||||
cables/apc.txt cables/ge-imv-victron.txt cables/imv.txt \
|
cables/apc.txt cables/ge-imv-victron.txt cables/imv.txt \
|
||||||
cables/mgeups.txt cables/powerware.txt cables/repotec.txt \
|
cables/mgeups.txt cables/powerware.txt cables/repotec.txt \
|
||||||
cables/sms.txt
|
cables/sms.txt
|
||||||
|
|
||||||
|
CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \
|
||||||
|
images/cables/belkin-f6cx-rkm-xu-cable.jpg images/cables/Lansafecable.jpg \
|
||||||
|
images/cables/mac-940-0024C.png images/cables/mge-66049.png \
|
||||||
|
images/cables/mge-db9-rj12.jpg images/cables/mge-db9-rj45.jpg \
|
||||||
|
images/cables/SOLA-330.png
|
||||||
|
|
||||||
|
EXTRA_DIST = $(SHARED_DEPS) $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \
|
||||||
|
$(CABLES_DEPS) FAQ.txt nut-hal.txt nut-qa.txt packager-guide.txt snmp.txt \
|
||||||
|
$(IMAGE_FILES) $(CABLES_IMAGES) docinfo.xml
|
||||||
|
|
||||||
|
ASCIIDOC_HTML_SINGLE = user-manual.html \
|
||||||
|
developer-guide.html \
|
||||||
|
packager-guide.html \
|
||||||
|
FAQ.html
|
||||||
|
|
||||||
|
ASCIIDOC_HTML_CHUNKED = user-manual.chunked \
|
||||||
|
developer-guide.chunked \
|
||||||
|
packager-guide.chunked \
|
||||||
|
FAQ.html
|
||||||
|
|
||||||
|
ASCIIDOC_PDF = user-manual.pdf \
|
||||||
|
developer-guide.pdf \
|
||||||
|
packager-guide.pdf \
|
||||||
|
FAQ.pdf
|
||||||
|
|
||||||
|
# Force build in ./ and man/ before website
|
||||||
|
SUBDIRS = . man website
|
||||||
|
SUFFIXES = .txt .html .pdf
|
||||||
|
|
||||||
|
all: doc
|
||||||
|
|
||||||
|
doc: @DOC_BUILD_LIST@
|
||||||
|
|
||||||
|
pdf: $(ASCIIDOC_PDF)
|
||||||
|
# also build the HTML manpages with these targets
|
||||||
|
html-single: $(ASCIIDOC_HTML_SINGLE)
|
||||||
|
html-chunked: $(ASCIIDOC_HTML_CHUNKED)
|
||||||
|
|
||||||
|
if HAVE_ASCIIDOC
|
||||||
|
website: html-chunked pdf
|
||||||
|
else !HAVE_ASCIIDOC
|
||||||
|
website:
|
||||||
|
@echo "Not building website documentation since 'asciidoc' was not found."
|
||||||
|
endif !HAVE_ASCIIDOC
|
||||||
|
|
||||||
|
clean-local:
|
||||||
|
rm -rf *.pdf *.html *.chunked docbook-xsl.css
|
||||||
|
|
||||||
|
### TODO: automatic dependency generation
|
||||||
|
FULL_USER_MANUAL_DEPS = $(USER_MANUAL_DEPS) $(SHARED_DEPS) ../README \
|
||||||
|
../INSTALL cables.txt ../UPGRADING ../TODO
|
||||||
|
FULL_DEVELOPER_GUIDE_DEPS = $(DEVELOPER_GUIDE_DEPS) $(SHARED_DEPS) \
|
||||||
|
../scripts/augeas/README
|
||||||
|
|
||||||
|
user-manual.html user-manual.chunked user-manual.pdf: $(FULL_USER_MANUAL_DEPS)
|
||||||
|
developer-guide.html developer-guide.chunked developer-guide.pdf: $(FULL_DEVELOPER_GUIDE_DEPS)
|
||||||
|
packager-guide.html packager-guide.chunked packager-guide.pdf: packager-guide.txt asciidoc.conf
|
||||||
|
|
||||||
|
# Note: without the "-v", asciidoc (circa 8.6.2) sometimes hangs when
|
||||||
|
# generating the chunked HTML. In this case, export the environment
|
||||||
|
# variable ASCIIDOC_VERBOSE to "-v", ie:
|
||||||
|
# $ ASCIIDOC_VERBOSE=-v make
|
||||||
|
A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \
|
||||||
|
--attribute localdate=`TZ=UTC date +%Y-%m-%d` \
|
||||||
|
--attribute localtime=`TZ=UTC date +%H:%M:%S` \
|
||||||
|
--attribute iconsdir=$(srcdir)/images \
|
||||||
|
--attribute=badges \
|
||||||
|
--attribute=external_title \
|
||||||
|
-a toc -a numbered --destination-dir=.
|
||||||
|
|
||||||
|
.txt.html:
|
||||||
|
$(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml $<
|
||||||
|
|
||||||
|
.txt.chunked:
|
||||||
|
$(A2X) $(A2X_COMMON_OPTS) --attribute=chunked_format --format=chunked $<
|
||||||
|
|
||||||
|
.txt.pdf: docinfo.xml
|
||||||
|
$(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $<
|
||||||
|
|
||||||
|
.PHONY: html html-single pdf website
|
||||||
|
|
418
docs/Makefile.in
|
@ -1,4 +1,4 @@
|
||||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
@ -14,9 +14,6 @@
|
||||||
# PARTICULAR PURPOSE.
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
# nothing to build here, but still need a Makefile to define which
|
|
||||||
# files to distribute
|
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
@ -38,14 +35,15 @@ build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
target_triplet = @target@
|
target_triplet = @target@
|
||||||
subdir = docs
|
subdir = docs
|
||||||
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_ipv6.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
|
@ -55,6 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
|
$(top_srcdir)/m4/nut_config_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.in
|
$(top_srcdir)/configure.in
|
||||||
|
@ -66,10 +65,52 @@ CONFIG_CLEAN_FILES =
|
||||||
CONFIG_CLEAN_VPATH_FILES =
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
SOURCES =
|
SOURCES =
|
||||||
DIST_SOURCES =
|
DIST_SOURCES =
|
||||||
|
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||||
|
html-recursive info-recursive install-data-recursive \
|
||||||
|
install-dvi-recursive install-exec-recursive \
|
||||||
|
install-html-recursive install-info-recursive \
|
||||||
|
install-pdf-recursive install-ps-recursive install-recursive \
|
||||||
|
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||||
|
ps-recursive uninstall-recursive
|
||||||
|
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||||
|
distclean-recursive maintainer-clean-recursive
|
||||||
|
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||||
|
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||||
|
distdir
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
am__relativize = \
|
||||||
|
dir0=`pwd`; \
|
||||||
|
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||||
|
sed_rest='s,^[^/]*/*,,'; \
|
||||||
|
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||||
|
sed_butlast='s,/*[^/]*$$,,'; \
|
||||||
|
while test -n "$$dir1"; do \
|
||||||
|
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first" != "."; then \
|
||||||
|
if test "$$first" = ".."; then \
|
||||||
|
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||||
|
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||||
|
else \
|
||||||
|
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||||
|
if test "$$first2" = "$$first"; then \
|
||||||
|
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||||
|
else \
|
||||||
|
dir2="../$$dir2"; \
|
||||||
|
fi; \
|
||||||
|
dir0="$$dir0"/"$$first"; \
|
||||||
|
fi; \
|
||||||
|
fi; \
|
||||||
|
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||||
|
done; \
|
||||||
|
reldir="$$dir2"
|
||||||
|
A2X = @A2X@
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
|
ASCIIDOC = @ASCIIDOC@
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -82,8 +123,10 @@ CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DBLATEX = @DBLATEX@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -100,7 +143,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@
|
||||||
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
||||||
HAL_FDI_PATH = @HAL_FDI_PATH@
|
HAL_FDI_PATH = @HAL_FDI_PATH@
|
||||||
HAL_USER = @HAL_USER@
|
HAL_USER = @HAL_USER@
|
||||||
HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
@ -111,22 +153,22 @@ LDFLAGS = @LDFLAGS@
|
||||||
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
||||||
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
||||||
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
||||||
LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@
|
LIBHAL_LIBS = @LIBHAL_LIBS@
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@
|
LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
||||||
LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@
|
LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
@ -222,20 +264,87 @@ top_build_prefix = @top_build_prefix@
|
||||||
top_builddir = @top_builddir@
|
top_builddir = @top_builddir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
udevdir = @udevdir@
|
udevdir = @udevdir@
|
||||||
EXTRA_DIST = acpi.txt big-servers.txt chroot.txt \
|
SHARED_DEPS = nut-names.txt asciidoc.conf
|
||||||
commands.txt config-files.txt configure.txt contact-closure.txt \
|
IMAGE_FILES = images/asciidoc.png \
|
||||||
data-room.txt design.txt developers.txt FAQ hid-subdrivers.txt \
|
images/eaton-logo.png \
|
||||||
ideas.txt macros.txt megatec.txt new-drivers.txt new-names.txt \
|
images/nut_layering.png \
|
||||||
nut-hal.txt osd-notify.txt \
|
images/note.png \
|
||||||
pager.txt powersaving.txt protocol.txt README shutdown.txt snmp.txt \
|
images/warning.png \
|
||||||
sock-protocol.txt ssl.txt upssched.txt cables/apc-rs500-serial.txt \
|
images/blue-arrow.png \
|
||||||
|
images/simple.png \
|
||||||
|
images/advanced.png \
|
||||||
|
images/bigbox.png \
|
||||||
|
images/bizarre.png \
|
||||||
|
images/old-cgi.png
|
||||||
|
|
||||||
|
USER_MANUAL_DEPS = acknowledgements.txt cables.txt config-notes.txt \
|
||||||
|
configure.txt download.txt documentation.txt features.txt history.txt \
|
||||||
|
outlets.txt scheduling.txt security.txt support.txt user-manual.txt \
|
||||||
|
stable-hcl.txt
|
||||||
|
|
||||||
|
DEVELOPER_GUIDE_DEPS = contact-closure.txt design.txt developers.txt \
|
||||||
|
developer-guide.txt hid-subdrivers.txt macros.txt \
|
||||||
|
new-clients.txt new-drivers.txt net-protocol.txt sock-protocol.txt
|
||||||
|
|
||||||
|
CABLES_DEPS = cables/apc-rs500-serial.txt \
|
||||||
cables/apc.txt cables/ge-imv-victron.txt cables/imv.txt \
|
cables/apc.txt cables/ge-imv-victron.txt cables/imv.txt \
|
||||||
cables/mgeups.txt cables/powerware.txt cables/repotec.txt \
|
cables/mgeups.txt cables/powerware.txt cables/repotec.txt \
|
||||||
cables/sms.txt
|
cables/sms.txt
|
||||||
|
|
||||||
all: all-am
|
CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \
|
||||||
|
images/cables/belkin-f6cx-rkm-xu-cable.jpg images/cables/Lansafecable.jpg \
|
||||||
|
images/cables/mac-940-0024C.png images/cables/mge-66049.png \
|
||||||
|
images/cables/mge-db9-rj12.jpg images/cables/mge-db9-rj45.jpg \
|
||||||
|
images/cables/SOLA-330.png
|
||||||
|
|
||||||
|
EXTRA_DIST = $(SHARED_DEPS) $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \
|
||||||
|
$(CABLES_DEPS) FAQ.txt nut-hal.txt nut-qa.txt packager-guide.txt snmp.txt \
|
||||||
|
$(IMAGE_FILES) $(CABLES_IMAGES) docinfo.xml
|
||||||
|
|
||||||
|
ASCIIDOC_HTML_SINGLE = user-manual.html \
|
||||||
|
developer-guide.html \
|
||||||
|
packager-guide.html \
|
||||||
|
FAQ.html
|
||||||
|
|
||||||
|
ASCIIDOC_HTML_CHUNKED = user-manual.chunked \
|
||||||
|
developer-guide.chunked \
|
||||||
|
packager-guide.chunked \
|
||||||
|
FAQ.html
|
||||||
|
|
||||||
|
ASCIIDOC_PDF = user-manual.pdf \
|
||||||
|
developer-guide.pdf \
|
||||||
|
packager-guide.pdf \
|
||||||
|
FAQ.pdf
|
||||||
|
|
||||||
|
|
||||||
|
# Force build in ./ and man/ before website
|
||||||
|
SUBDIRS = . man website
|
||||||
|
SUFFIXES = .txt .html .pdf
|
||||||
|
|
||||||
|
### TODO: automatic dependency generation
|
||||||
|
FULL_USER_MANUAL_DEPS = $(USER_MANUAL_DEPS) $(SHARED_DEPS) ../README \
|
||||||
|
../INSTALL cables.txt ../UPGRADING ../TODO
|
||||||
|
|
||||||
|
FULL_DEVELOPER_GUIDE_DEPS = $(DEVELOPER_GUIDE_DEPS) $(SHARED_DEPS) \
|
||||||
|
../scripts/augeas/README
|
||||||
|
|
||||||
|
|
||||||
|
# Note: without the "-v", asciidoc (circa 8.6.2) sometimes hangs when
|
||||||
|
# generating the chunked HTML. In this case, export the environment
|
||||||
|
# variable ASCIIDOC_VERBOSE to "-v", ie:
|
||||||
|
# $ ASCIIDOC_VERBOSE=-v make
|
||||||
|
A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \
|
||||||
|
--attribute localdate=`TZ=UTC date +%Y-%m-%d` \
|
||||||
|
--attribute localtime=`TZ=UTC date +%H:%M:%S` \
|
||||||
|
--attribute iconsdir=$(srcdir)/images \
|
||||||
|
--attribute=badges \
|
||||||
|
--attribute=external_title \
|
||||||
|
-a toc -a numbered --destination-dir=.
|
||||||
|
|
||||||
|
all: all-recursive
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .txt .html .pdf .chunked
|
||||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
@for dep in $?; do \
|
@for dep in $?; do \
|
||||||
case '$(am__configure_deps)' in \
|
case '$(am__configure_deps)' in \
|
||||||
|
@ -272,12 +381,141 @@ mostlyclean-libtool:
|
||||||
|
|
||||||
clean-libtool:
|
clean-libtool:
|
||||||
-rm -rf .libs _libs
|
-rm -rf .libs _libs
|
||||||
|
|
||||||
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
|
# into them and run `make' without going through this Makefile.
|
||||||
|
# To change the values of `make' variables: instead of editing Makefiles,
|
||||||
|
# (1) if the variable is set in `config.status', edit `config.status'
|
||||||
|
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||||
|
# (2) otherwise, pass the desired values on the `make' command line.
|
||||||
|
$(RECURSIVE_TARGETS):
|
||||||
|
@fail= failcom='exit 1'; \
|
||||||
|
for f in x $$MAKEFLAGS; do \
|
||||||
|
case $$f in \
|
||||||
|
*=* | --[!k]*);; \
|
||||||
|
*k*) failcom='fail=yes';; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
dot_seen=no; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
dot_seen=yes; \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| eval $$failcom; \
|
||||||
|
done; \
|
||||||
|
if test "$$dot_seen" = "no"; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||||
|
fi; test -z "$$fail"
|
||||||
|
|
||||||
|
$(RECURSIVE_CLEAN_TARGETS):
|
||||||
|
@fail= failcom='exit 1'; \
|
||||||
|
for f in x $$MAKEFLAGS; do \
|
||||||
|
case $$f in \
|
||||||
|
*=* | --[!k]*);; \
|
||||||
|
*k*) failcom='fail=yes';; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
dot_seen=no; \
|
||||||
|
case "$@" in \
|
||||||
|
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||||
|
*) list='$(SUBDIRS)' ;; \
|
||||||
|
esac; \
|
||||||
|
rev=''; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = "."; then :; else \
|
||||||
|
rev="$$subdir $$rev"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
rev="$$rev ."; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
for subdir in $$rev; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| eval $$failcom; \
|
||||||
|
done && test -z "$$fail"
|
||||||
|
tags-recursive:
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||||
|
done
|
||||||
|
ctags-recursive:
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||||
|
done
|
||||||
|
|
||||||
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
mkid -fID $$unique
|
||||||
tags: TAGS
|
tags: TAGS
|
||||||
TAGS:
|
|
||||||
|
|
||||||
|
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
set x; \
|
||||||
|
here=`pwd`; \
|
||||||
|
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||||
|
include_option=--etags-include; \
|
||||||
|
empty_fix=.; \
|
||||||
|
else \
|
||||||
|
include_option=--include; \
|
||||||
|
empty_fix=; \
|
||||||
|
fi; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test ! -f $$subdir/TAGS || \
|
||||||
|
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
shift; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
if test $$# -gt 0; then \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
"$$@" $$unique; \
|
||||||
|
else \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$unique; \
|
||||||
|
fi; \
|
||||||
|
fi
|
||||||
ctags: CTAGS
|
ctags: CTAGS
|
||||||
CTAGS:
|
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||||
|
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||||
|
test -z "$(CTAGS_ARGS)$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& $(am__cd) $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
distdir: $(DISTFILES)
|
distdir: $(DISTFILES)
|
||||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
@ -309,19 +547,48 @@ distdir: $(DISTFILES)
|
||||||
|| exit 1; \
|
|| exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test -d "$(distdir)/$$subdir" \
|
||||||
|
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_distdir=$$reldir; \
|
||||||
|
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||||
|
$(am__relativize); \
|
||||||
|
new_top_distdir=$$reldir; \
|
||||||
|
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||||
|
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||||
|
($(am__cd) $$subdir && \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$$new_top_distdir" \
|
||||||
|
distdir="$$new_distdir" \
|
||||||
|
am__remove_distdir=: \
|
||||||
|
am__skip_length_check=: \
|
||||||
|
am__skip_mode_fix=: \
|
||||||
|
distdir) \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-am
|
check: check-recursive
|
||||||
all-am: Makefile
|
all-am: Makefile
|
||||||
installdirs:
|
installdirs: installdirs-recursive
|
||||||
install: install-am
|
installdirs-am:
|
||||||
install-exec: install-exec-am
|
install: install-recursive
|
||||||
install-data: install-data-am
|
install-exec: install-exec-recursive
|
||||||
uninstall: uninstall-am
|
install-data: install-data-recursive
|
||||||
|
uninstall: uninstall-recursive
|
||||||
|
|
||||||
install-am: all-am
|
install-am: all-am
|
||||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
installcheck: installcheck-am
|
installcheck: installcheck-recursive
|
||||||
install-strip:
|
install-strip:
|
||||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
@ -338,86 +605,119 @@ distclean-generic:
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
clean: clean-am
|
clean: clean-recursive
|
||||||
|
|
||||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
|
||||||
|
|
||||||
distclean: distclean-am
|
distclean: distclean-recursive
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
distclean-am: clean-am distclean-generic
|
distclean-am: clean-am distclean-generic distclean-tags
|
||||||
|
|
||||||
dvi: dvi-am
|
dvi: dvi-recursive
|
||||||
|
|
||||||
dvi-am:
|
dvi-am:
|
||||||
|
|
||||||
html: html-am
|
html: html-recursive
|
||||||
|
|
||||||
html-am:
|
html-am:
|
||||||
|
|
||||||
info: info-am
|
info: info-recursive
|
||||||
|
|
||||||
info-am:
|
info-am:
|
||||||
|
|
||||||
install-data-am:
|
install-data-am:
|
||||||
|
|
||||||
install-dvi: install-dvi-am
|
install-dvi: install-dvi-recursive
|
||||||
|
|
||||||
install-dvi-am:
|
install-dvi-am:
|
||||||
|
|
||||||
install-exec-am:
|
install-exec-am:
|
||||||
|
|
||||||
install-html: install-html-am
|
install-html: install-html-recursive
|
||||||
|
|
||||||
install-html-am:
|
install-html-am:
|
||||||
|
|
||||||
install-info: install-info-am
|
install-info: install-info-recursive
|
||||||
|
|
||||||
install-info-am:
|
install-info-am:
|
||||||
|
|
||||||
install-man:
|
install-man:
|
||||||
|
|
||||||
install-pdf: install-pdf-am
|
install-pdf: install-pdf-recursive
|
||||||
|
|
||||||
install-pdf-am:
|
install-pdf-am:
|
||||||
|
|
||||||
install-ps: install-ps-am
|
install-ps: install-ps-recursive
|
||||||
|
|
||||||
install-ps-am:
|
install-ps-am:
|
||||||
|
|
||||||
installcheck-am:
|
installcheck-am:
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-am
|
maintainer-clean: maintainer-clean-recursive
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
mostlyclean: mostlyclean-am
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
pdf: pdf-am
|
|
||||||
|
|
||||||
pdf-am:
|
pdf-am:
|
||||||
|
|
||||||
ps: ps-am
|
ps: ps-recursive
|
||||||
|
|
||||||
ps-am:
|
ps-am:
|
||||||
|
|
||||||
uninstall-am:
|
uninstall-am:
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
|
||||||
|
install-am install-strip tags-recursive
|
||||||
|
|
||||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||||
distclean distclean-generic distclean-libtool distdir dvi \
|
all all-am check check-am clean clean-generic clean-libtool \
|
||||||
dvi-am html html-am info info-am install install-am \
|
clean-local ctags ctags-recursive distclean distclean-generic \
|
||||||
install-data install-data-am install-dvi install-dvi-am \
|
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||||
install-exec install-exec-am install-html install-html-am \
|
html-am info info-am install install-am install-data \
|
||||||
install-info install-info-am install-man install-pdf \
|
install-data-am install-dvi install-dvi-am install-exec \
|
||||||
install-pdf-am install-ps install-ps-am install-strip \
|
install-exec-am install-html install-html-am install-info \
|
||||||
installcheck installcheck-am installdirs maintainer-clean \
|
install-info-am install-man install-pdf install-pdf-am \
|
||||||
|
install-ps install-ps-am install-strip installcheck \
|
||||||
|
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||||
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
maintainer-clean-generic mostlyclean mostlyclean-generic \
|
||||||
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
|
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
|
||||||
|
uninstall uninstall-am
|
||||||
|
|
||||||
|
|
||||||
|
all: doc
|
||||||
|
|
||||||
|
doc: @DOC_BUILD_LIST@
|
||||||
|
|
||||||
|
pdf: $(ASCIIDOC_PDF)
|
||||||
|
# also build the HTML manpages with these targets
|
||||||
|
html-single: $(ASCIIDOC_HTML_SINGLE)
|
||||||
|
html-chunked: $(ASCIIDOC_HTML_CHUNKED)
|
||||||
|
|
||||||
|
@HAVE_ASCIIDOC_TRUE@website: html-chunked pdf
|
||||||
|
@HAVE_ASCIIDOC_FALSE@website:
|
||||||
|
@HAVE_ASCIIDOC_FALSE@ @echo "Not building website documentation since 'asciidoc' was not found."
|
||||||
|
|
||||||
|
clean-local:
|
||||||
|
rm -rf *.pdf *.html *.chunked docbook-xsl.css
|
||||||
|
|
||||||
|
user-manual.html user-manual.chunked user-manual.pdf: $(FULL_USER_MANUAL_DEPS)
|
||||||
|
developer-guide.html developer-guide.chunked developer-guide.pdf: $(FULL_DEVELOPER_GUIDE_DEPS)
|
||||||
|
packager-guide.html packager-guide.chunked packager-guide.pdf: packager-guide.txt asciidoc.conf
|
||||||
|
|
||||||
|
.txt.html:
|
||||||
|
$(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml $<
|
||||||
|
|
||||||
|
.txt.chunked:
|
||||||
|
$(A2X) $(A2X_COMMON_OPTS) --attribute=chunked_format --format=chunked $<
|
||||||
|
|
||||||
|
.txt.pdf: docinfo.xml
|
||||||
|
$(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $<
|
||||||
|
|
||||||
|
.PHONY: html html-single pdf website
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
When creating files in here, use the following 4 headers:
|
|
||||||
|
|
||||||
Desc: A brief description of the document
|
|
||||||
File: The filename (this is for tracking which one is the original)
|
|
||||||
Date: The date of last modification
|
|
||||||
Auth: The author, i.e. "First Last <foo@example.com>".
|
|
||||||
|
|
||||||
Note: anything in the form <.*@.*> will be removed when converted to HTML
|
|
||||||
to reduce the number of e-mail addresses harvested from the web servers.
|
|
150
docs/acknowledgements.txt
Normal file
|
@ -0,0 +1,150 @@
|
||||||
|
ifndef::external_title[]
|
||||||
|
Acknowledgements
|
||||||
|
================
|
||||||
|
endif::external_title[]
|
||||||
|
|
||||||
|
This project is the result of years of work by many individuals and companies.
|
||||||
|
|
||||||
|
Many people have written or tweaked the software; the drivers, clients, server
|
||||||
|
and documentation have all received valuable attention from numerous sources.
|
||||||
|
|
||||||
|
Many of them are listed within the source code, AUTHORS file, release notes, and
|
||||||
|
mailing list archives, but some prefer to be anonymous.
|
||||||
|
This software would not be possible without their help.
|
||||||
|
|
||||||
|
|
||||||
|
The NUT Team
|
||||||
|
------------
|
||||||
|
|
||||||
|
Active members
|
||||||
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- Arnaud Quette: project leader (since 2005), Debian packager and jack of all trades
|
||||||
|
- Arjen de Korte: senior lieutenant
|
||||||
|
- Charles Lepple: senior lieutenant
|
||||||
|
- Kjell Claesson: senior developer
|
||||||
|
- Alexander Gordeev: junior developer
|
||||||
|
- David Goncalves: Python developer
|
||||||
|
- Eric S. Raymond: Documentation consultant
|
||||||
|
- Oden Eriksson: Mandriva packager
|
||||||
|
- Stanislav Brabec: Novell / Suse packager
|
||||||
|
- Michal Hlavinka: Redhat packager
|
||||||
|
|
||||||
|
Retired members
|
||||||
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- Russell Kroll: Founder, and project leader from 1996 to 2005
|
||||||
|
- Peter Selinger: senior lieutenant
|
||||||
|
- Carlos Rodrigues: author of the "megatec" drivers, removing the numerous
|
||||||
|
drivers for Megatec / Q1 protocol. These drivers have now been replaced by
|
||||||
|
blazer_ser and blazer_usb
|
||||||
|
- Niels Baggesen: ported and heavily extended upscode2 to NUT 2.0 driver model
|
||||||
|
- Niklas Edmundsson: has worked on 3-phase support, and upscode2 updates
|
||||||
|
- Martin Loyer: has worked a bit on mge-utalk
|
||||||
|
- Jonathan Dion: MGE internship (summer 2006), who has worked on configuration
|
||||||
|
- Doug Reynolds: has worked on CyberPower support (powerpanel driver)
|
||||||
|
- Jon Gough: has worked on porting the megatec driver to USB (megatec_usb)
|
||||||
|
- Dominique Lallement: Consultant (chairman of the USB/HID PDC Forum)
|
||||||
|
- Julius Malkiewicz: junior developer
|
||||||
|
- Tomas Smetana: former Redhat packager (2007-2008)
|
||||||
|
|
||||||
|
[[Eaton]]
|
||||||
|
Our main supporter: Eaton
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Through the acquisition of MGE Office Protection Systems (a carve out of
|
||||||
|
the MGE UPS SYSTEMS small systems, up to 10 KVA), Eaton has been supporting
|
||||||
|
NUT, and more generally the Free/Libre Opensource Software Community
|
||||||
|
since around 2002.
|
||||||
|
|
||||||
|
This support includes the following actions:
|
||||||
|
|
||||||
|
- providing extensive technical documents (Eaton protocols library),
|
||||||
|
- providing units to developers of NUT and related projects,
|
||||||
|
- hosting the networkupstools.org webserver,
|
||||||
|
- providing artwork,
|
||||||
|
- promoting NUT in general.
|
||||||
|
|
||||||
|
For more detailed information on Eaton's Opensource commitment, please refer to
|
||||||
|
link:http://opensource.eaton.com[Eaton Opensource website].
|
||||||
|
|
||||||
|
Supporting manufacturers
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
UPS manufacturers
|
||||||
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- link:http://powerquality.eaton.com[Eaton], our main supporter, as presented in
|
||||||
|
the <<Eaton,above section>>.
|
||||||
|
|
||||||
|
- link:http://www.gamatronic.com[Gamatronic], through Nadav Moskovitch, has
|
||||||
|
revived the 'sec' driver (as gamatronic), and expanded a bit genericups for its
|
||||||
|
UPSs with alarm interface.
|
||||||
|
|
||||||
|
- link:http://www.microdowell.com[Microdowell], through Elio Corbolante, has
|
||||||
|
created the 'microdowell' driver to support the Enterprise Nxx/Bxx serial devices.
|
||||||
|
They also proposes NUT as an alternative to its software for
|
||||||
|
link:http://www.microdowell.com/fra/download.html[Linux / Unix].
|
||||||
|
|
||||||
|
- link:http://pcmups.com.tw[Powercom], through Alexey Morozov, has provided
|
||||||
|
link:ups-protocol.html[extensive information] on its USB/HID devices, along
|
||||||
|
with development units.
|
||||||
|
|
||||||
|
Appliances manufacturers
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
- link:http://www.opengear.com[OpenGear] has worked with NUT's leader to
|
||||||
|
successfully develop and integrate PDU support. Opengear, through Scott Burns,
|
||||||
|
and Robert Waldie, has submitted several patches.
|
||||||
|
|
||||||
|
Other contributors
|
||||||
|
------------------
|
||||||
|
|
||||||
|
- Pavel Korensky's original apcd provided the inspiration for pursuing APC's
|
||||||
|
smart protocol in 1996
|
||||||
|
- Eric Lawson provided scans of the OneAC protocol
|
||||||
|
- John Marley used OCR software to transform the SEC protocol scans into a HTML
|
||||||
|
document
|
||||||
|
- Chris McKinnon scanned and converted the Fortress protocol documentation
|
||||||
|
- Tank provided documentation on the Belkin/Delta protocol
|
||||||
|
- Potrans provided a Fenton PowerPal 600 (P series) for development of the
|
||||||
|
safenet driver.
|
||||||
|
|
||||||
|
Older entries (before 2005)
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
- MGE UPS SYSTEMS was the previous NUT sponsor. They provided protocols
|
||||||
|
information, many units for development of NUT-related projects.
|
||||||
|
Several drivers such as mge-utalk, mge-shut, snmp-ups, hidups, and usbhid-ups
|
||||||
|
are the result of this collaboration, in addition to the WMNut, MGE HID Parser
|
||||||
|
the libhid projects, ... through Arnaud.
|
||||||
|
All the MGE supporters have now gone with Eaton (through MGE Office
|
||||||
|
Protection Systems), which is the new NUT sponsor.
|
||||||
|
|
||||||
|
- Fenton Technologies contributed a PowerPal 660 to the project. Their open
|
||||||
|
stance and quick responses to technical inquiries were appreciated for
|
||||||
|
making the development of the fentonups driver possible.
|
||||||
|
Fenton has since been acquired by link:http://www.metapo.com[Metapo].
|
||||||
|
|
||||||
|
- Bo Kersey of link:http://www.vircio.com[VirCIO] provided a Best Power Fortress
|
||||||
|
750 to facilitate the bestups driver.
|
||||||
|
|
||||||
|
- Invensys Energy Systems provided the SOLA/Best "Phoenixtec" protocol
|
||||||
|
document. SOLA has since been acquired by Eaton.
|
||||||
|
|
||||||
|
- PowerKinetics technical support provided documentation on their MiniCOL
|
||||||
|
protocol, which is archived in the NUT protocol library.
|
||||||
|
PowerKinetics was acquired by the link:http://www.jst.cc[JST Group] in June 2003.
|
||||||
|
|
||||||
|
- link:http://www.cyberpowersystems.com[Cyber Power Systems] contributed a
|
||||||
|
700AVR model for testing and development of the cyberpower driver.
|
||||||
|
|
||||||
|
- link:http://www.liebert.com[Liebert Corporation] supplied serial test boxes
|
||||||
|
and a UPStation GXT2 with the Web/SNMP card for development of the liebert
|
||||||
|
driver and expansion of the existing snmp-ups driver.
|
||||||
|
Liebert has since been acquired by link:http://www.emerson.com[Emerson].
|
||||||
|
|
||||||
|
NOTE: If a company or individual isn't listed here, then we probably don't have
|
||||||
|
enough information about the situation. Developers are requested to report vendor
|
||||||
|
contributions to the NUT team so this list may reflect their help.
|
||||||
|
If we have left you out, send us some mail.
|
|
@ -1,32 +0,0 @@
|
||||||
Desc: Equivalence between ACPI and NUT variable naming
|
|
||||||
File: acpi.txt
|
|
||||||
Date: 30 September 2005
|
|
||||||
Auth: Arnaud Quette <aquette.dev@gmail.com>
|
|
||||||
|
|
||||||
This document presents an equivalence table between ACPI data
|
|
||||||
and NUT variable naming.
|
|
||||||
|
|
||||||
|
|
||||||
+-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.CapacityMode | percent | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.DesignCapacity | 100 | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.FullChargeCapacity | 100 | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.Rechargeable | true / yes / 1 | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.ConfigVoltage | output.voltage.nominal | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.WarningCapacityLimit | ? battery.charge.low | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.RemainingCapacityLimit | battery.charge.low | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.CapacityGranularity1 | ? | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.CapacityGranularity2 | ? | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.iProduct | ups.model | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.iSerialNumber | ups.serial | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.iDeviceChemistry | battery.type | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.iOEMInformation | ? | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.Discharging | ups.status = DISCHRG | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.Charging | ups.status = CHRG | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.BelowRemainingCapacityLimit | ups.status = LB | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.Current | ? output.current | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.RemainingCapacity | battery.charge | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.Voltage | output.voltage | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
|PowerSummary.RemainingCapacityLimit | battery.charge.low | +-------------------------------------------------------+---------------------------------------+
|
|
||||||
| PowerSummary.ACPresent | ups.status = OL |
|
|
||||||
+-------------------------------------------------------+---------------------------------------+
|
|
55
docs/asciidoc.conf
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
## NUT macros: linkman, linkdoc
|
||||||
|
#
|
||||||
|
# Usage: linkman:command[manpage-section]
|
||||||
|
# This macro allows to handle variable manpage location, depending on the
|
||||||
|
# document type
|
||||||
|
#
|
||||||
|
# Note, {0} is the manpage section, while {target} is the command.
|
||||||
|
#
|
||||||
|
# Example: linkman:ups.conf[5]
|
||||||
|
#
|
||||||
|
# Show NUT link as: <command>(<section>); if section is defined, else just show
|
||||||
|
# the command.
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# Usage: linkdoc:document[display title,[anchor]]
|
||||||
|
# This macro allows to handle variable NUT documentation location, depending
|
||||||
|
# on the document type
|
||||||
|
#
|
||||||
|
# Note, {1} is the display title, {2} is the optional anchor name,
|
||||||
|
# {0} is the whole set of args ({1}...{n}) and {target} is the
|
||||||
|
# base document name.
|
||||||
|
# Example:
|
||||||
|
# linkdoc:user-manual[user manual,NUT_Security]
|
||||||
|
# linkdoc:developer-guide[developer guide,_status_data]
|
||||||
|
|
||||||
|
[macros]
|
||||||
|
(?su)[\\]?(?P<name>linkman):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
|
||||||
|
(?su)[\\]?(?P<name>linkdoc):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
|
||||||
|
|
||||||
|
ifdef::basebackend-docbook[]
|
||||||
|
ifdef::xhtml11_format[]
|
||||||
|
[linkman-inlinemacro]
|
||||||
|
<ulink url="man/{target}.html">{target}{0?({0})}</ulink>
|
||||||
|
[linkdoc-inlinemacro]
|
||||||
|
<ulink url="{target}.html{2?#{2}}">{1}</ulink>
|
||||||
|
endif::xhtml11_format[]
|
||||||
|
|
||||||
|
# FIXME: linkdoc does not support 'anchor'
|
||||||
|
ifdef::chunked_format[]
|
||||||
|
[linkman-inlinemacro]
|
||||||
|
<ulink url="../man/{target}.html">{target}{0?({0})}</ulink>
|
||||||
|
[linkdoc-inlinemacro]
|
||||||
|
<ulink url="../{target}.chunked/index.html">{1}</ulink>
|
||||||
|
endif::chunked_format[]
|
||||||
|
|
||||||
|
# PDF output points online versions
|
||||||
|
# FIXME: linkdoc does not support 'anchor'
|
||||||
|
ifdef::pdf_format[]
|
||||||
|
[linkman-inlinemacro]
|
||||||
|
<ulink url="http://www.networkupstools.org/docs/man/{target}.html">{target}{0?({0})}</ulink>
|
||||||
|
[linkdoc-inlinemacro]
|
||||||
|
<ulink url="{target}.pdf">{1}</ulink>
|
||||||
|
endif::pdf_format[]
|
||||||
|
endif::basebackend-docbook[]
|
|
@ -1,68 +0,0 @@
|
||||||
Desc: Typical setups for big servers
|
|
||||||
File: big-servers.txt
|
|
||||||
Date: 14 March 2004
|
|
||||||
Auth: Russell Kroll <rkroll@exploits.org>
|
|
||||||
|
|
||||||
By using multiple MONITOR statements in upsmon.conf, you can configure
|
|
||||||
an environment where a large machine with redundant power monitors
|
|
||||||
multiple separate UPSes. For the examples in this document, I will use
|
|
||||||
a HP NetServer LH4 in the stock configuration with 3 of the 4 power
|
|
||||||
supplies installed.
|
|
||||||
|
|
||||||
Compared to some systems, the LH4 is unusual because it has common power
|
|
||||||
cords for multiple power supplies. One cord feeds two supplies. As a
|
|
||||||
result, each UPS drives two of the power supplies, so losing that UPS
|
|
||||||
affects both at the same time.
|
|
||||||
|
|
||||||
For our examples, UPS "Alpha" is connected to the cord that drives the
|
|
||||||
two power supplies, and ups "Beta" is connected to the other with just a
|
|
||||||
single power supply.
|
|
||||||
|
|
||||||
Since the server needs two supplies to stay alive, we can lose "Beta" at
|
|
||||||
any time, but losing "Alpha" is a showstopper. We make a note of them
|
|
||||||
when configuring upsmon:
|
|
||||||
|
|
||||||
MONITOR ups-alpha@myhost 2 monuser mypass master
|
|
||||||
MONITOR ups-beta@myhost 1 monuser mypass master
|
|
||||||
MINSUPPLIES 2
|
|
||||||
|
|
||||||
With that configuration, upsmon will only shut down when Alpha reaches
|
|
||||||
a critical (on battery + low battery) condition, since Beta by itself
|
|
||||||
is not enough to keep the system running. Beta, on the other hand,
|
|
||||||
can go up and down as much as it wants and nothing will happen as long
|
|
||||||
as the other one keeps working.
|
|
||||||
|
|
||||||
The MINSUPPLIES line tells upsmon that we need at least 2 power supplies
|
|
||||||
to be receiving power from a good UPS (on line or on battery, just not
|
|
||||||
on battery and low battery).
|
|
||||||
|
|
||||||
Adding redundancy
|
|
||||||
=================
|
|
||||||
|
|
||||||
The above example assumed the stock hardware configuration. Let's say
|
|
||||||
we have successfully cajoled the boss into providing the money for a
|
|
||||||
fourth power supply. Now both power cords run two power supplies, and
|
|
||||||
the system is maxed out in terms of redundancy.
|
|
||||||
|
|
||||||
The upsmon.conf must be updated to reflect this:
|
|
||||||
|
|
||||||
MONITOR ups-alpha@myhost 2 monuser mypass master
|
|
||||||
MONITOR ups-beta@myhost 2 monuser mypass master
|
|
||||||
MINSUPPLIES 2
|
|
||||||
|
|
||||||
Beta is now driving two power supplies, so we upgrade its power value.
|
|
||||||
This means that either Alpha *or* Beta can totally shut down and the
|
|
||||||
server will be able to keep running.
|
|
||||||
|
|
||||||
As an added bonus, this means you can move a running server from one UPS
|
|
||||||
to another without bringing it down since the minimum power will be
|
|
||||||
provided at all times.
|
|
||||||
|
|
||||||
Other configurations
|
|
||||||
====================
|
|
||||||
|
|
||||||
There are a lot of ways to handle this and they all come down to how many
|
|
||||||
power supplies, power cords and independent UPS connections you have. A
|
|
||||||
system with a 1:1 cord:supply ratio has more wires stuffed behind it, but
|
|
||||||
it's much easier to move things around since any given UPS drives a smaller
|
|
||||||
percentage of the overall power.
|
|
120
docs/cables.txt
Normal file
|
@ -0,0 +1,120 @@
|
||||||
|
ifdef::website[]
|
||||||
|
Cables
|
||||||
|
======
|
||||||
|
endif::website[]
|
||||||
|
|
||||||
|
APC
|
||||||
|
---
|
||||||
|
|
||||||
|
940-0024C clone
|
||||||
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
*From D. Stimits*
|
||||||
|
|
||||||
|
image::images/cables/940-0024C.jpg[APCC 940-0024C clone diagram]
|
||||||
|
|
||||||
|
NOTE: The original 940-0024C diagram was contributed by Steve Draper.
|
||||||
|
|
||||||
|
940-0024C clone for Macs
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
*From Miguel Howard*
|
||||||
|
|
||||||
|
image::images/cables/mac-940-0024C.png[APCC 940-0024C clone cable for Macs]
|
||||||
|
|
||||||
|
Belkin
|
||||||
|
------
|
||||||
|
|
||||||
|
OmniGuard F6C***-RKM
|
||||||
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
*From "Daniel"*
|
||||||
|
|
||||||
|
A straight-through RS-232 cable (with pins 2-7 connected through) should work
|
||||||
|
with the following models:
|
||||||
|
|
||||||
|
- F6C110-RKM-2U
|
||||||
|
- F6C150-RKM-2U
|
||||||
|
- F6C230-RKM-2U
|
||||||
|
- F6C320-RKM-3U
|
||||||
|
|
||||||
|
image::images/cables/belkin-f6cx-rkm-xu-cable.jpg[Belkin OmniGuard F6C***-RKM cable]
|
||||||
|
|
||||||
|
Eaton
|
||||||
|
-----
|
||||||
|
|
||||||
|
Documents in this section are provided courtesy of Eaton.
|
||||||
|
|
||||||
|
MGE Office Protection Systems
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The two first cables also applies to MGE UPS SYSTEMS.
|
||||||
|
|
||||||
|
DB9-DB9 cable (ref 66049)
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This is the standard serial cable, used on most units.
|
||||||
|
|
||||||
|
image::images/cables/mge-66049.png[DB9-DB9 cable]
|
||||||
|
|
||||||
|
DB9-RJ45 cable
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This cable is used on the more recent models, including Ellipse MAX, Protection
|
||||||
|
Station, ...
|
||||||
|
|
||||||
|
image::images/cables/mge-db9-rj45.jpg[DB9-RJ45 cable]
|
||||||
|
|
||||||
|
DB9-RJ12 cable
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This cable is used on some older Ellipse models.
|
||||||
|
|
||||||
|
image::images/cables/mge-db9-rj12.jpg[DB9-RJ12 cable]
|
||||||
|
|
||||||
|
Powerware LanSafe
|
||||||
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
image::images/cables/Lansafecable.jpg[Powerware LanSafe cable]
|
||||||
|
|
||||||
|
SOLA-330
|
||||||
|
~~~~~~~~
|
||||||
|
|
||||||
|
Just uses a normal serial cable, with pin 1-1 through to 9-9.
|
||||||
|
|
||||||
|
image::images/cables/SOLA-330.png[SOLA-330 cable]
|
||||||
|
|
||||||
|
|
||||||
|
HP - Compaq
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Older Compaq UPS Family
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
This cable can be used with the following models:
|
||||||
|
|
||||||
|
T700, T1000, T1500, T1500j, T700h, T1000h, T1500h, R1500, R1500j,
|
||||||
|
R1500h, T2000, T2000j, T2400h, T2400h-NA, R3000 / R3000j, R3000h,
|
||||||
|
R3000h-International, R3000h-NA, R6000h-NA, R6000i, R6000j.
|
||||||
|
|
||||||
|
UPS PC 9 pin connector
|
||||||
|
|
||||||
|
1 --------- 3
|
||||||
|
2 --------- 2
|
||||||
|
4 -\
|
||||||
|
4 --------- 5 |
|
||||||
|
6 -/
|
||||||
|
6 --------- 7
|
||||||
|
|
||||||
|
Contributed by Kjell Claesson and Arnaud Quette.
|
||||||
|
|
||||||
|
|
||||||
|
Tripp-Lite
|
||||||
|
----------
|
||||||
|
|
||||||
|
*From Tripp-Lite, via Bryan Kolodziej*
|
||||||
|
|
||||||
|
This cable (black 73-0844 cable) is used on various models, using the "Lan 2.2 interface"
|
||||||
|
and the genericups driver (upstype=5).
|
||||||
|
|
||||||
|
image::images/cables/73-0724.png[73-0724 cable]
|
|
@ -10,7 +10,7 @@ Data cable 1 for UPS:
|
||||||
Driver: victronups (newvictronups)
|
Driver: victronups (newvictronups)
|
||||||
|
|
||||||
|
|
||||||
UPS PC 9 pin [2~connector
|
UPS PC 9 pin connector
|
||||||
1 --------- 3
|
1 --------- 3
|
||||||
2 --------- 2
|
2 --------- 2
|
||||||
5 --------- 5 GND
|
5 --------- 5 GND
|
||||||
|
|
|
@ -13,4 +13,4 @@ FEMEA DB9 MACHO DB9
|
||||||
|
|
||||||
- This cable is working with Manager III 1300 VA and 650 VA, SMS Ups's
|
- This cable is working with Manager III 1300 VA and 650 VA, SMS Ups's
|
||||||
- Jump in computer side pins 4/8 and conect to pin 1 in UPS side
|
- Jump in computer side pins 4/8 and conect to pin 1 in UPS side
|
||||||
- Use megatec driver from Nut Package
|
- Use NUT blazer_ser driver
|
||||||
|
|
110
docs/chroot.txt
|
@ -1,110 +0,0 @@
|
||||||
Desc: chrooting and other forms of paranoia
|
|
||||||
File: chroot.txt
|
|
||||||
Date: 24 August 2003
|
|
||||||
Auth: Russell Kroll <rkroll@exploits.org>
|
|
||||||
|
|
||||||
It has been possible to run the drivers and upsd in a chrooted jail for
|
|
||||||
some time, but it involved a number of evil hacks. The 1.3 series adds
|
|
||||||
much saner chroot behavior, using BIND 9 as an inspiration.
|
|
||||||
|
|
||||||
The old way involved creating an entire tree, complete with libraries, a
|
|
||||||
shell (!), and many auxiliary files. This was hard to maintain and
|
|
||||||
could have become an interesting playground for an intruder. The new
|
|
||||||
way is minimal, and leaves little in the way of usable materials within
|
|
||||||
the jail.
|
|
||||||
|
|
||||||
This document assumes that you already have created at least one user
|
|
||||||
account for the software to use. If you're still letting it fall back
|
|
||||||
on "nobody", stop right here and go figure that out first. It also
|
|
||||||
assumes that you have everything else configured and running happily all
|
|
||||||
by itself.
|
|
||||||
|
|
||||||
Essentially, you need to create your configuration directory and state
|
|
||||||
path in their own little world, plus a special device or two.
|
|
||||||
|
|
||||||
For the purposes of this example, the chroot jail is /chroot/nut. The
|
|
||||||
programs have been built with the default prefix, so they are using
|
|
||||||
/usr/local/ups. First, create the confpath and bring over a few files.
|
|
||||||
|
|
||||||
mkdir -p /chroot/nut/usr/local/ups/etc
|
|
||||||
cd /chroot/nut/usr/local/ups/etc
|
|
||||||
cp -a /usr/local/ups/etc/upsd.users .
|
|
||||||
cp -a /usr/local/ups/etc/upsd.conf .
|
|
||||||
cp -a /usr/local/ups/etc/ups.conf .
|
|
||||||
|
|
||||||
I'm using 'cp -a' to maintain the permissions on those files.
|
|
||||||
|
|
||||||
Now bring over your state path, maintaining the same permissions as
|
|
||||||
before.
|
|
||||||
|
|
||||||
mkdir -p /chroot/nut/var/state
|
|
||||||
cp -a /var/state/ups /chroot/nut/var/state
|
|
||||||
|
|
||||||
Next we must put /etc/localtime inside the jail, or you may get very
|
|
||||||
strange readings in your syslog. You'll know you have this problem if
|
|
||||||
upsd shows up as UTC in the syslog while the rest of the system doesn't.
|
|
||||||
|
|
||||||
mkdir -p /chroot/nut/etc
|
|
||||||
cp /etc/localtime /chroot/nut/etc
|
|
||||||
|
|
||||||
Note that this is not "cp -a", since we want to copy the *content*, not
|
|
||||||
the symlink that it may be on some systems.
|
|
||||||
|
|
||||||
Finally, create a tiny bit of /dev so the programs can enter the
|
|
||||||
background properly - they redirect fds into the bit bucket to make sure
|
|
||||||
nothing else grabs 0-2.
|
|
||||||
|
|
||||||
mkdir -p /chroot/nut/dev
|
|
||||||
cp -a /dev/null /chroot/nut/dev
|
|
||||||
|
|
||||||
Try to start your driver(s) and make sure everything fires up as before.
|
|
||||||
|
|
||||||
upsdrvctl -r /chroot/nut -u nutdev start
|
|
||||||
|
|
||||||
Once your drivers are running properly, try starting upsd.
|
|
||||||
|
|
||||||
upsd -r /chroot/nut -u nutsrv
|
|
||||||
|
|
||||||
Check your syslog. If nothing is complaining, try running clients like
|
|
||||||
upsc and upsmon. If they seem happy, then you're done.
|
|
||||||
|
|
||||||
symlinks
|
|
||||||
--------
|
|
||||||
|
|
||||||
After you do this, you will have two copies of many things, like the
|
|
||||||
confpath and the state path. I recommend deleting the 'real'
|
|
||||||
/var/state/ups, replacing it with a symlink to
|
|
||||||
/chroot/nut/var/state/ups. That will let other programs reference the
|
|
||||||
.pid files without a lot of hassle.
|
|
||||||
|
|
||||||
You can also do this with your confpath and point /usr/local/ups/etc at
|
|
||||||
/chroot/nut/usr/local/ups/etc unless you're worried about something
|
|
||||||
hurting the files inside that directory. In that case, you should
|
|
||||||
maintain a 'master' copy and push it into the chroot path after
|
|
||||||
making changes.
|
|
||||||
|
|
||||||
upsdrvctl itself does not chroot, so the ups.conf still needs to be in
|
|
||||||
the usual confpath.
|
|
||||||
|
|
||||||
upsmon
|
|
||||||
------
|
|
||||||
|
|
||||||
This has not yet been applied to upsmon, since it can be quite
|
|
||||||
complicated when there are notifiers that need to be run. One
|
|
||||||
possibility would be for upsmon to have three instances:
|
|
||||||
|
|
||||||
- privileged root parent that listens for a shutdown command
|
|
||||||
|
|
||||||
- unprivileged child that listens for notify events
|
|
||||||
|
|
||||||
- unprivileged chrooted child that does network I/O
|
|
||||||
|
|
||||||
This one is messy, and may not happen for some time, if ever.
|
|
||||||
|
|
||||||
Config files
|
|
||||||
------------
|
|
||||||
|
|
||||||
You may now set chroot= and user= in the global section of ups.conf.
|
|
||||||
|
|
||||||
upsd chroots before opening any config files, so there is no way to
|
|
||||||
add support for that in upsd.conf at the present time.
|
|
|
@ -1,62 +0,0 @@
|
||||||
Desc: Commands sent to the UPS drivers
|
|
||||||
File: commands.txt
|
|
||||||
Date: 9 January 2004
|
|
||||||
Auth: Russell Kroll <rkroll@exploits.org>
|
|
||||||
|
|
||||||
upsd can call drivers to store values in read/write variables and to kick
|
|
||||||
off instant commands. This is how you register handlers for those events.
|
|
||||||
|
|
||||||
The driver core (drivers/main.c) has a structure called upsh. You
|
|
||||||
should populate it with function pointers in your upsdrv_initinfo()
|
|
||||||
function. Right now, there are only two possibilities:
|
|
||||||
|
|
||||||
- setvar = setting UPS variables (SET VAR protocol command)
|
|
||||||
- instcmd = instant UPS commands (INSTCMD protocol command)
|
|
||||||
|
|
||||||
SET
|
|
||||||
---
|
|
||||||
|
|
||||||
If your driver's function for handling variable set events is called
|
|
||||||
my_ups_set(), then you'd do this to add the pointer:
|
|
||||||
|
|
||||||
upsh.setvar = my_ups_set;
|
|
||||||
|
|
||||||
my_ups_set() will receive two parameters:
|
|
||||||
|
|
||||||
const char * - the variable being changed
|
|
||||||
const char * - the new value
|
|
||||||
|
|
||||||
You should return either STAT_SET_HANDLED if your driver recognizes the
|
|
||||||
command, or STAT_SET_UNKNOWN if it doesn't. Other possibilities will be
|
|
||||||
added at some point in the future.
|
|
||||||
|
|
||||||
INSTCMD
|
|
||||||
-------
|
|
||||||
|
|
||||||
This works just like the set process, with slightly different values
|
|
||||||
arriving from the server.
|
|
||||||
|
|
||||||
upsh.instcmd = my_ups_cmd;
|
|
||||||
|
|
||||||
Your function will receive two args:
|
|
||||||
|
|
||||||
const char * - the command name
|
|
||||||
const char * - (reserved)
|
|
||||||
|
|
||||||
You should return either STAT_INSTCMD_HANDLED or STAT_INSTCMD_UNKNOWN
|
|
||||||
depending on whether your driver can handle the requested command.
|
|
||||||
|
|
||||||
Notes
|
|
||||||
-----
|
|
||||||
|
|
||||||
Use strcasecmp. The command names arriving from upsd should be treated
|
|
||||||
without regards to case.
|
|
||||||
|
|
||||||
Responses
|
|
||||||
---------
|
|
||||||
|
|
||||||
Drivers will eventually be expected to send responses to commands.
|
|
||||||
Right now, there is no channel to get these back through upsd to
|
|
||||||
the client, so this is not implemented.
|
|
||||||
|
|
||||||
This will probably be implemented with a polling scheme in the clients.
|
|
|
@ -1,64 +0,0 @@
|
||||||
Desc: Details about the configuration files
|
|
||||||
File: config-files.txt
|
|
||||||
Date: 30 April 2003
|
|
||||||
Auth: Russell Kroll <rkroll@exploits.org>
|
|
||||||
|
|
||||||
All configuration files within this package are parsed with a common
|
|
||||||
state machine, which means they all can use a number of extras described
|
|
||||||
in this file.
|
|
||||||
|
|
||||||
First, most of the programs use an uppercase word to declare a
|
|
||||||
configuration directive. This may be something like MONITOR, NOTIFYCMD,
|
|
||||||
or ACCESS. The case does matter here. "monitor" won't be recognized.
|
|
||||||
|
|
||||||
Next, the parser does not care about whitespace between words. If you
|
|
||||||
like to indent things with tabs or spaces, feel free to do it here.
|
|
||||||
|
|
||||||
If you need to set a value to something containing spaces, it has to be
|
|
||||||
contained within "quotes" to keep the parser from splitting up the line.
|
|
||||||
That is, you want to use something like this:
|
|
||||||
|
|
||||||
SHUTDOWNCMD "/sbin/shutdown -h +0"
|
|
||||||
|
|
||||||
Without the quotes, it would only see the first word on the line.
|
|
||||||
|
|
||||||
OK, so let's say you really need to embed that kind of quote within your
|
|
||||||
configuration directive for some reason. You can do that too.
|
|
||||||
|
|
||||||
NOTIFYCMD "/bin/notifyme -foo -bar \"hi there\" -baz"
|
|
||||||
|
|
||||||
In other words, \ can be used to escape the ".
|
|
||||||
|
|
||||||
Finally, for the situation where you need to put the \ character into your
|
|
||||||
string, you just escape it.
|
|
||||||
|
|
||||||
NOTIFYCMD "/bin/notifyme c:\\dos\\style\\path"
|
|
||||||
|
|
||||||
The \ can actually be used to escape any character, but you only really
|
|
||||||
need it for \, ", and # as they have special meanings to the parser.
|
|
||||||
|
|
||||||
# is the comment character. Anything after an unescaped # is ignored.
|
|
||||||
|
|
||||||
Something like this...
|
|
||||||
|
|
||||||
identity = my#1ups
|
|
||||||
|
|
||||||
... will actually turn into "identity = my", since the # stops the
|
|
||||||
parsing. If you really need to have a # in your configuration, then
|
|
||||||
escape it.
|
|
||||||
|
|
||||||
identity = my\#1ups
|
|
||||||
|
|
||||||
Much better.
|
|
||||||
|
|
||||||
Line spanning
|
|
||||||
=============
|
|
||||||
|
|
||||||
You can put a backslash at the end of the line to join it to the next
|
|
||||||
one. This creates one virtual line that is composed of more than one
|
|
||||||
physical line.
|
|
||||||
|
|
||||||
Also, if you leave the "" quote container open before a newline, it will
|
|
||||||
keep scanning until it reaches another one. If you see bizarre behavior
|
|
||||||
in your configuration files, check for an unintentional instance of
|
|
||||||
quotes spanning multiple lines.
|
|
798
docs/config-notes.txt
Normal file
|
@ -0,0 +1,798 @@
|
||||||
|
Configuration notes
|
||||||
|
===================
|
||||||
|
|
||||||
|
This chapter describe most of the configuration and use aspects of NUT,
|
||||||
|
including establishing communication with the device and configuring safe
|
||||||
|
shutdowns when the UPS battery runs out of power.
|
||||||
|
|
||||||
|
There are many programs and <<Features,features>> in this
|
||||||
|
package. You should check out the <<Overview,NUT Overview>>
|
||||||
|
and other accompanying documentation to see how it all works.
|
||||||
|
|
||||||
|
NOTE: NUT does not currently provide proper graphical configuration tools.
|
||||||
|
However, there is now support for linkdoc:developer-guide[Augeas,augeas_user].
|
||||||
|
|
||||||
|
Details about the configuration files
|
||||||
|
-------------------------------------
|
||||||
|
|
||||||
|
Generalities
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
All configuration files within this package are parsed with a common
|
||||||
|
state machine, which means they all can use a number of extras described here.
|
||||||
|
|
||||||
|
First, most of the programs use an uppercase word to declare a
|
||||||
|
configuration directive. This may be something like MONITOR, NOTIFYCMD,
|
||||||
|
or ACCESS. The case does matter here. "monitor" won't be recognized.
|
||||||
|
|
||||||
|
Next, the parser does not care about whitespace between words. If you
|
||||||
|
like to indent things with tabs or spaces, feel free to do it here.
|
||||||
|
|
||||||
|
If you need to set a value to something containing spaces, it has to be
|
||||||
|
contained within "quotes" to keep the parser from splitting up the line.
|
||||||
|
That is, you want to use something like this:
|
||||||
|
|
||||||
|
SHUTDOWNCMD "/sbin/shutdown -h +0"
|
||||||
|
|
||||||
|
Without the quotes, it would only see the first word on the line.
|
||||||
|
|
||||||
|
OK, so let's say you really need to embed that kind of quote within your
|
||||||
|
configuration directive for some reason. You can do that too.
|
||||||
|
|
||||||
|
NOTIFYCMD "/bin/notifyme -foo -bar \"hi there\" -baz"
|
||||||
|
|
||||||
|
In other words, \ can be used to escape the ".
|
||||||
|
|
||||||
|
Finally, for the situation where you need to put the \ character into your
|
||||||
|
string, you just escape it.
|
||||||
|
|
||||||
|
NOTIFYCMD "/bin/notifyme c:\\dos\\style\\path"
|
||||||
|
|
||||||
|
The \ can actually be used to escape any character, but you only really
|
||||||
|
need it for \, ", and # as they have special meanings to the parser.
|
||||||
|
|
||||||
|
# is the comment character. Anything after an unescaped # is ignored.
|
||||||
|
|
||||||
|
Something like this...
|
||||||
|
|
||||||
|
identity = my#1ups
|
||||||
|
|
||||||
|
... will actually turn into "identity = my", since the # stops the
|
||||||
|
parsing. If you really need to have a # in your configuration, then
|
||||||
|
escape it.
|
||||||
|
|
||||||
|
identity = my\#1ups
|
||||||
|
|
||||||
|
Much better.
|
||||||
|
|
||||||
|
Line spanning
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
You can put a backslash at the end of the line to join it to the next
|
||||||
|
one. This creates one virtual line that is composed of more than one
|
||||||
|
physical line.
|
||||||
|
|
||||||
|
Also, if you leave the "" quote container open before a newline, it will
|
||||||
|
keep scanning until it reaches another one. If you see bizarre behavior
|
||||||
|
in your configuration files, check for an unintentional instance of
|
||||||
|
quotes spanning multiple lines.
|
||||||
|
|
||||||
|
|
||||||
|
Basic configuration
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
This chapter describe the base configuration to establish communication with
|
||||||
|
the device.
|
||||||
|
|
||||||
|
This will be sufficient for PDU. But for UPS and SCD, you will also need to
|
||||||
|
configure <<UPS_shutdown,automatic shutdowns for low battery events>>.
|
||||||
|
|
||||||
|
image:images/simple.png[]
|
||||||
|
|
||||||
|
[[Driver_configuration]]
|
||||||
|
Driver configuration
|
||||||
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Create one section per UPS in /usr/local/ups/etc/ups.conf
|
||||||
|
|
||||||
|
To find out which driver to use, check the <<HCL,Hardware Compatibility List>>,
|
||||||
|
or data/driver.list.
|
||||||
|
|
||||||
|
Once you have picked a driver, create a section for your UPS in
|
||||||
|
ups.conf. You must supply values for "driver" and "port".
|
||||||
|
|
||||||
|
Some drivers may require other flags or settings. The "desc" value
|
||||||
|
is optional, but is recommended to provide a better description of
|
||||||
|
what your UPS is supporting.
|
||||||
|
|
||||||
|
A typical device without any extra settings looks like this:
|
||||||
|
|
||||||
|
[mydevice]
|
||||||
|
driver = mydriver
|
||||||
|
port = /dev/ttyS1
|
||||||
|
desc = "Workstation"
|
||||||
|
|
||||||
|
NOTE: USB drivers (usbhid-ups, bcmxcp_usb, tripplite_usb, blazer_usb and
|
||||||
|
richcomm_usb) are special cases and ignore the 'port' value.
|
||||||
|
You must still set this value, but it does not matter what you set
|
||||||
|
it to; a common and good practice is to set 'port' to *auto*, but you can
|
||||||
|
put whatever you like. If you only own one UBS UPS, the driver will
|
||||||
|
find it automatically. If you own more than one, refer to the driver's
|
||||||
|
manual page for more information on matching a specific device.
|
||||||
|
|
||||||
|
References: linkman:ups.conf[5],
|
||||||
|
linkman:nutupsdrv[8],
|
||||||
|
linkman:bcmxcp_usb[8],
|
||||||
|
linkman:blazer[8],
|
||||||
|
linkman:richcomm_usb[8],
|
||||||
|
linkman:tripplite_usb[8],
|
||||||
|
linkman:usbhid-ups[8]
|
||||||
|
|
||||||
|
|
||||||
|
[[Starting_drivers]]
|
||||||
|
Starting the driver(s)
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Start the driver(s) for your hardware:
|
||||||
|
|
||||||
|
/usr/local/ups/bin/upsdrvctl start
|
||||||
|
|
||||||
|
Make sure the driver doesn't report any errors. It should show a
|
||||||
|
few details about the hardware and then enter the background. You
|
||||||
|
should get back to the command prompt a few seconds later. For
|
||||||
|
reference, a successful start of the `usbhid-ups` driver looks like this:
|
||||||
|
|
||||||
|
# /usr/local/ups/bin/upsdrvctl start
|
||||||
|
Network UPS Tools - Generic HID driver 0.34 (2.4.1)
|
||||||
|
USB communication driver 0.31
|
||||||
|
Using subdriver: MGE HID 1.12
|
||||||
|
Detected EATON - Ellipse MAX 1100 [ADKK22008]
|
||||||
|
|
||||||
|
If the driver doesn't start cleanly, make sure you have picked the
|
||||||
|
right one for your hardware. You might need to try other drivers
|
||||||
|
by changing the "driver=" value in ups.conf.
|
||||||
|
|
||||||
|
Be sure to check the driver's man page to see if it needs any extra
|
||||||
|
settings in ups.conf to detect your hardware.
|
||||||
|
|
||||||
|
If it says "can't bind /var/state/ups/..." or similar, then your
|
||||||
|
state path probably isn't writable by the driver. Check the
|
||||||
|
<<StatePath,permissions and mode on that directory>>.
|
||||||
|
|
||||||
|
After making changes, try the <<Ownership, Ownership and permissions>> step again.
|
||||||
|
|
||||||
|
References: man pages: linkman:nutupsdrv[8], linkman:upsdrvctl[8]
|
||||||
|
|
||||||
|
|
||||||
|
Data server configuration (upsd)
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Configure upsd, which serves data from the drivers to the clients.
|
||||||
|
|
||||||
|
First, edit upsd.conf to allow access to your client systems. By
|
||||||
|
default, upsd will only listen to localhost port 3493/tcp. If you want
|
||||||
|
to connect to it from other machines, you must specify each interface you
|
||||||
|
want upsd to listen on for connections, optionally with a port number.
|
||||||
|
|
||||||
|
LISTEN 127.0.0.1 3493
|
||||||
|
LISTEN ::1 3493
|
||||||
|
|
||||||
|
NOTE: Refer to the NUT user manual <<NUT_Security,security chapter>> for
|
||||||
|
information on how to access and secure upsd clients connections.
|
||||||
|
|
||||||
|
Next, create upsd.users. For now, this can be an empty file.
|
||||||
|
You can come back and add more to it later when it's time to
|
||||||
|
configure upsmon or run one of the management tools.
|
||||||
|
|
||||||
|
Do not make either file world-readable, since they both hold
|
||||||
|
access control data and passwords. They just need to be readable by
|
||||||
|
the user you created in the preparation process.
|
||||||
|
|
||||||
|
The suggested configuration is to chown it to root, chgrp it to the
|
||||||
|
group you created, then make it readable by the group.
|
||||||
|
|
||||||
|
chown root:nut upsd.conf upsd.users
|
||||||
|
chmod 0640 upsd.conf upsd.users
|
||||||
|
|
||||||
|
References: man pages: linkman:upsd.conf[5],
|
||||||
|
linkman:upsd.users[5],
|
||||||
|
linkman:upsd[8]
|
||||||
|
|
||||||
|
[[Starting_upsd]]
|
||||||
|
Starting the data server
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Start the network data server:
|
||||||
|
|
||||||
|
/usr/local/ups/sbin/upsd
|
||||||
|
|
||||||
|
Make sure it is able to connect to the driver(s) on your system.
|
||||||
|
A successful run looks like this:
|
||||||
|
|
||||||
|
# /usr/local/ups/sbin/upsd
|
||||||
|
Network UPS Tools upsd 2.4.1
|
||||||
|
listening on 127.0.0.1 port 3493
|
||||||
|
listening on ::1 port 3493
|
||||||
|
Connected to UPS [eaton]: usbhid-ups-eaton
|
||||||
|
|
||||||
|
upsd prints dots while it waits for the driver to respond. Your
|
||||||
|
system may print more or less depending on how many drivers you
|
||||||
|
have and how fast they are.
|
||||||
|
|
||||||
|
NOTE: if upsd says that it can't connect to a UPS or that the data
|
||||||
|
is stale, then your ups.conf is not configured correctly, or you
|
||||||
|
have a driver that isn't working properly. You must fix this before
|
||||||
|
going on to the next step.
|
||||||
|
|
||||||
|
Reference: man page: linkman:upsd[8]
|
||||||
|
|
||||||
|
Check the UPS data
|
||||||
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Status data
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
Make sure that the UPS is providing good status data.
|
||||||
|
|
||||||
|
/usr/local/ups/bin/upsc myupsname@localhost ups.status
|
||||||
|
|
||||||
|
You should see just one line in response:
|
||||||
|
|
||||||
|
OL
|
||||||
|
|
||||||
|
OL means your system is running on line power. If it says something
|
||||||
|
else (like OB - on battery, or LB - low battery), your driver was
|
||||||
|
probably misconfigured during the <<Driver_configuration, Driver configuration>>
|
||||||
|
step. If you reconfigure the driver, use 'upsdrvctl stop' to stop it, then
|
||||||
|
start it again as shown in the <<Starting_drivers, Starting driver(s)>> step.
|
||||||
|
|
||||||
|
Reference: man page: linkman:upsc[8]
|
||||||
|
|
||||||
|
|
||||||
|
All data
|
||||||
|
^^^^^^^^
|
||||||
|
|
||||||
|
Look at all of the status data which is being monitored.
|
||||||
|
|
||||||
|
/usr/local/ups/bin/upsc myupsname@localhost
|
||||||
|
|
||||||
|
What happens now depends on the kind of device and driver you have.
|
||||||
|
In the list, you should see ups.status with the same value you got
|
||||||
|
above. A sample run on a UPS (Eaton Ellipse MAX 1100) looks like this:
|
||||||
|
|
||||||
|
battery.charge: 100
|
||||||
|
battery.charge.low: 20
|
||||||
|
battery.runtime: 2525
|
||||||
|
battery.type: PbAc
|
||||||
|
device.mfr: EATON
|
||||||
|
device.model: Ellipse MAX 1100
|
||||||
|
device.serial: ADKK22008
|
||||||
|
device.type: ups
|
||||||
|
driver.name: usbhid-ups
|
||||||
|
driver.parameter.pollfreq: 30
|
||||||
|
driver.parameter.pollinterval: 2
|
||||||
|
driver.parameter.port: auto
|
||||||
|
driver.version: 2.4.1-1988:1990M
|
||||||
|
driver.version.data: MGE HID 1.12
|
||||||
|
driver.version.internal: 0.34
|
||||||
|
input.sensitivity: normal
|
||||||
|
input.transfer.boost.low: 185
|
||||||
|
input.transfer.high: 285
|
||||||
|
input.transfer.low: 165
|
||||||
|
input.transfer.trim.high: 265
|
||||||
|
input.voltage.extended: no
|
||||||
|
outlet.1.desc: PowerShare Outlet 1
|
||||||
|
outlet.1.id: 2
|
||||||
|
outlet.1.status: on
|
||||||
|
outlet.1.switchable: no
|
||||||
|
outlet.desc: Main Outlet
|
||||||
|
outlet.id: 1
|
||||||
|
outlet.switchable: no
|
||||||
|
output.frequency.nominal: 50
|
||||||
|
output.voltage: 230.0
|
||||||
|
output.voltage.nominal: 230
|
||||||
|
ups.beeper.status: enabled
|
||||||
|
ups.delay.shutdown: 20
|
||||||
|
ups.delay.start: 30
|
||||||
|
ups.firmware: 5102AH
|
||||||
|
ups.load: 0
|
||||||
|
ups.mfr: EATON
|
||||||
|
ups.model: Ellipse MAX 1100
|
||||||
|
ups.power.nominal: 1100
|
||||||
|
ups.productid: ffff
|
||||||
|
ups.serial: ADKK22008
|
||||||
|
ups.status: OL CHRG
|
||||||
|
ups.timer.shutdown: -1
|
||||||
|
ups.timer.start: -1
|
||||||
|
ups.vendorid: 0463
|
||||||
|
|
||||||
|
Reference: man page: linkman:upsc[8],
|
||||||
|
<<nut-names,NUT command and variable naming scheme>>
|
||||||
|
|
||||||
|
Startup scripts
|
||||||
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
NOTE: This step is not need if you installed from packages.
|
||||||
|
|
||||||
|
Edit your startup scripts, and make sure upsdrvctl and upsd are run every time
|
||||||
|
your system starts.
|
||||||
|
|
||||||
|
[[UPS_shutdown]]
|
||||||
|
Configuring automatic shutdowns for low battery events
|
||||||
|
------------------------------------------------------
|
||||||
|
|
||||||
|
The whole point of UPS software is to bring down the OS cleanly when you
|
||||||
|
run out of battery power. Everything else is roughly eye candy.
|
||||||
|
|
||||||
|
To make sure your system shuts down properly, you will need to perform some
|
||||||
|
additional configuration and run upsmon. Here are the basics.
|
||||||
|
|
||||||
|
[[Shutdown_design]]
|
||||||
|
Shutdown design
|
||||||
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
When your UPS batteries get low, the operating system needs to be brought
|
||||||
|
down cleanly. Also, the UPS load should be turned off so that all devices
|
||||||
|
that are attached to it are forcibly rebooted.
|
||||||
|
|
||||||
|
Here are the steps that occur when a critical power event happens:
|
||||||
|
|
||||||
|
1. The UPS goes on battery
|
||||||
|
|
||||||
|
2. The UPS reaches low battery (a "critical" UPS)
|
||||||
|
|
||||||
|
3. The upsmon master notices and sets "FSD" - the "forced shutdown"
|
||||||
|
flag to tell all slave systems that it will soon power down the load.
|
||||||
|
+
|
||||||
|
(If you have no slaves, skip to step 6)
|
||||||
|
|
||||||
|
4. upsmon slave systems see "FSD" and:
|
||||||
|
|
||||||
|
- generate a NOTIFY_SHUTDOWN event
|
||||||
|
- wait FINALDELAY seconds - typically 5
|
||||||
|
- call their SHUTDOWNCMD
|
||||||
|
- disconnect from upsd
|
||||||
|
|
||||||
|
5. The upsmon master system waits up to HOSTSYNC seconds (typically 15)
|
||||||
|
for the slaves to disconnect from upsd. If any are connected after
|
||||||
|
this time, upsmon stops waiting and proceeds with the shutdown
|
||||||
|
process.
|
||||||
|
|
||||||
|
6. The upsmon master:
|
||||||
|
|
||||||
|
- generates a NOTIFY_SHUTDOWN event
|
||||||
|
- waits FINALDELAY seconds - typically 5
|
||||||
|
- creates the POWERDOWNFLAG file - usually /etc/killpower
|
||||||
|
- calls the SHUTDOWNCMD
|
||||||
|
|
||||||
|
7. On most systems, init takes over, kills your processes, syncs and
|
||||||
|
unmounts some filesystems, and remounts some read-only.
|
||||||
|
|
||||||
|
8. init then runs your shutdown script. This checks for the
|
||||||
|
POWERDOWNFLAG, finds it, and tells the UPS driver(s) to power off
|
||||||
|
the load.
|
||||||
|
|
||||||
|
9. The system loses power.
|
||||||
|
|
||||||
|
10. Time passes. The power returns, and the UPS switches back on.
|
||||||
|
|
||||||
|
11. All systems reboot and go back to work.
|
||||||
|
|
||||||
|
|
||||||
|
How you set it up
|
||||||
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
[[NUT_user_creation]]
|
||||||
|
NUT user creation
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Create a upsd user for upsmon to use while monitoring this UPS.
|
||||||
|
|
||||||
|
Edit upsd.users and create a new section. upsmon will connect
|
||||||
|
to upsd and use this user name (in brackets) and password to
|
||||||
|
authenticate. This example is for a user called "monuser":
|
||||||
|
|
||||||
|
[monuser]
|
||||||
|
password = mypass
|
||||||
|
upsmon master
|
||||||
|
# or upsmon slave
|
||||||
|
|
||||||
|
References: linkman:upsd[8], linkman:upsd.users[5]
|
||||||
|
|
||||||
|
Reloading the data server
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Reload upsd. Depending on your configuration, you may be able to
|
||||||
|
do this without stopping upsd:
|
||||||
|
|
||||||
|
/usr/local/ups/sbin/upsd -c reload
|
||||||
|
|
||||||
|
If that doesn't work (check the syslog), just restart it:
|
||||||
|
|
||||||
|
/usr/local/ups/sbin/upsd -c stop
|
||||||
|
/usr/local/ups/sbin/upsd
|
||||||
|
|
||||||
|
NOTE: if you want to make reloading work later, see the entry in the
|
||||||
|
link:FAQ.html[FAQ] about starting upsd as a different user.
|
||||||
|
|
||||||
|
Power Off flag file
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Set the POWERDOWNFLAG location for upsmon.
|
||||||
|
|
||||||
|
In upsmon.conf, add a POWERDOWNFLAG directive with a filename.
|
||||||
|
upsmon will create this file when the UPS needs to be powered off
|
||||||
|
during a power failure when low battery is reached.
|
||||||
|
|
||||||
|
We will test for the presence of this file in a later step.
|
||||||
|
|
||||||
|
POWERDOWNFLAG /etc/killpower
|
||||||
|
|
||||||
|
References: man pages: linkman:upsmon[8],
|
||||||
|
linkman:upsmon.conf[5]
|
||||||
|
|
||||||
|
Securing upsmon.conf
|
||||||
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The recommended setting is to have it owned by root:nut, then make it readable
|
||||||
|
by the group and not world. This file contains passwords that could be used by
|
||||||
|
an attacker to start a shutdown, so keep it secure.
|
||||||
|
|
||||||
|
chown root:nut upsmon.conf
|
||||||
|
chmod 0640 upsmon.conf
|
||||||
|
|
||||||
|
This step has been placed early in the process so you secure this file before
|
||||||
|
adding sensitive data in the next step.
|
||||||
|
|
||||||
|
|
||||||
|
Create a MONITOR directive for upsmon
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Edit upsmon.conf and create a MONITOR line with the UPS definition
|
||||||
|
(<upsname>@<hostname>), username and password from the <<NUT_user_creation, NUT user creation>>
|
||||||
|
step, and the master or slave setting.
|
||||||
|
|
||||||
|
If it's the master (i.e., it's connected to this UPS directly):
|
||||||
|
|
||||||
|
MONITOR myupsname@mybox 1 monuser mypass master
|
||||||
|
|
||||||
|
If it's just monitoring this UPS over the network, and some other system is the
|
||||||
|
master:
|
||||||
|
|
||||||
|
MONITOR myupsname@mybox 1 monuser mypass slave
|
||||||
|
|
||||||
|
The number "1" here is the power value. This should always be set to 1 unless
|
||||||
|
you have a very special (read: expensive) system with redundant power supplies.
|
||||||
|
In such cases, refer to the User Manual:
|
||||||
|
|
||||||
|
- <<BigServers,typical setups for big servers>>,
|
||||||
|
- <<DataRoom,typical setups for data rooms>>.
|
||||||
|
|
||||||
|
References: linkman:upsmon[8], linkman:upsmon.conf[5]
|
||||||
|
|
||||||
|
Define a SHUTDOWNCMD for upsmon
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Still in upsmon.conf, add a directive that tells upsmon how to shut down your
|
||||||
|
system. This example seems to work on most systems:
|
||||||
|
|
||||||
|
SHUTDOWNCMD "/sbin/shutdown -h +0"
|
||||||
|
|
||||||
|
Notice the presence of "quotes" here to keep it together.
|
||||||
|
|
||||||
|
If your system has special needs, you may want to set this to a script which
|
||||||
|
does local shutdown tasks before calling init.
|
||||||
|
|
||||||
|
|
||||||
|
Start upsmon
|
||||||
|
^^^^^^^^^^^^
|
||||||
|
|
||||||
|
/usr/local/ups/sbin/upsmon
|
||||||
|
|
||||||
|
If it complains about something, then check your configuration.
|
||||||
|
|
||||||
|
Checking upsmon
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Look for messages in the syslog to indicate success. It should look something
|
||||||
|
like this:
|
||||||
|
|
||||||
|
May 29 01:11:27 mybox upsmon[102]: Startup successful
|
||||||
|
May 29 01:11:28 mybox upsd[100]: Client monuser@192.168.50.1
|
||||||
|
logged into UPS [myupsname]
|
||||||
|
|
||||||
|
Any errors seen here are probably due to an error in the config files of either
|
||||||
|
`upsmon` or `upsd`. You should fix them before continuing.
|
||||||
|
|
||||||
|
|
||||||
|
Startup scripts
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
NOTE: This step is not need if you installed from packages.
|
||||||
|
|
||||||
|
Edit your startup scripts, and add a call to `upsmon`.
|
||||||
|
|
||||||
|
Make sure `upsmon` starts when your system comes up. Do it after `upsdrvctl`
|
||||||
|
and `upsd`, or it will complain about not being able to contact the server.
|
||||||
|
|
||||||
|
You may delete the POWERDOWNFLAG in the startup scripts, but it is not
|
||||||
|
necessary. `upsmon` will clear that file for you when it starts.
|
||||||
|
|
||||||
|
NOTE: Init script examples are provide in the 'scripts' directory of
|
||||||
|
the NUT source tree, and in the various <<_binary_packages,packages>>
|
||||||
|
that exist.
|
||||||
|
|
||||||
|
Shutdown scripts
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
NOTE: This step is not need if you installed from packages.
|
||||||
|
|
||||||
|
Edit your shutdown scripts, and add `upsdrvctl shutdown`.
|
||||||
|
|
||||||
|
You should configure your system to power down the UPS after the filesystems are
|
||||||
|
remounted read-only. Have it look for the presence of the POWERDOWNFLAG (from
|
||||||
|
linkman:upsmon.conf[5]), using this as an example:
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if (test -f /etc/killpower)
|
||||||
|
then
|
||||||
|
echo "Killing the power, bye!"
|
||||||
|
/usr/local/ups/bin/upsdrvctl shutdown
|
||||||
|
|
||||||
|
sleep 120
|
||||||
|
|
||||||
|
# uh oh... the UPS power-off failed
|
||||||
|
# you probably want to reboot here so you don't get stuck!
|
||||||
|
# *** see also the section on power races in the FAQ! ***
|
||||||
|
fi
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
[WARNING]
|
||||||
|
================================================================================
|
||||||
|
- Be careful that upsdrvctl command will probably power off your machine.
|
||||||
|
Don't use it unless your system is ready to be halted by force.
|
||||||
|
If you run RAID, read the <<_raid_warning,RAID warning>> below!
|
||||||
|
|
||||||
|
- Make sure the filesystem(s) containing upsdrvctl, ups.conf and your UPS
|
||||||
|
driver(s) are mounted (possibly in read-only mode) when the system gets to this
|
||||||
|
point. Otherwise it won't be able to figure out what to do.
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
|
||||||
|
[[Testing_shutdowns]]
|
||||||
|
Testing shutdowns
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
UPS equipment varies from manufacturer to manufacturer and even within
|
||||||
|
model lines. You should test the shutdown sequence on your systems before
|
||||||
|
leaving them unattended. A successful sequence is one where the OS halts
|
||||||
|
before the battery runs out, and the system restarts when power returns.
|
||||||
|
|
||||||
|
The first step is to see how upsdrvctl will behave without actually turning off
|
||||||
|
power. To do so, use the '-t' argument:
|
||||||
|
|
||||||
|
/usr/local/ups/bin/upsdrvctl -t shutdown
|
||||||
|
|
||||||
|
It will display the sequence without actually calling the drivers.
|
||||||
|
|
||||||
|
|
||||||
|
You can finally test a forced shutdown sequence (FSD) using:
|
||||||
|
|
||||||
|
/usr/local/ups/sbin/upsmon -c fsd
|
||||||
|
|
||||||
|
This will execute a full shutdown sequence, as presented in
|
||||||
|
<<Shutdown_design,Shutdown design>>, starting from the 3rd step.
|
||||||
|
|
||||||
|
If everything works correctly, the computer will be forcibly powered
|
||||||
|
off, may remain off for a few seconds to a few minutes (depending on
|
||||||
|
the driver and UPS type), then will power on again.
|
||||||
|
|
||||||
|
If your UPS just sits there and never resets the load, you are vulnerable
|
||||||
|
to a power race and should add the "reboot after timeout" hack at the very
|
||||||
|
least.
|
||||||
|
|
||||||
|
Also refer to the section on power races in the link:FAQ.html[FAQ].
|
||||||
|
|
||||||
|
Using suspend to disk
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Support for suspend to RAM and suspend to disk has been available in
|
||||||
|
the Linux kernel for a while now. For obvious reasons, suspending to
|
||||||
|
RAM isn't particularly useful when the UPS battery is getting low,
|
||||||
|
but suspend to disk may be an interesting concept.
|
||||||
|
|
||||||
|
This approach minimizes the amount of disruption which would be caused
|
||||||
|
by an extended outage. The UPS goes on battery, then reaches low
|
||||||
|
battery, and the system takes a snapshot of itself and halts. Then it
|
||||||
|
is turned off and waits for the power to return.
|
||||||
|
|
||||||
|
Once the power is back, the system reboots, pulls the snapshot back in,
|
||||||
|
and keeps going from there. If the user happened to be away when it
|
||||||
|
happened, they may return and have no idea that their system actually
|
||||||
|
shut down completely in the middle.
|
||||||
|
|
||||||
|
In order for this to work, you need to shutdown NUT (UPS driver, upsd
|
||||||
|
server and upsmon client) in the suspend script and start them again in
|
||||||
|
the resume script. Don't try to keep them running. The upsd server
|
||||||
|
will latch the FSD state (so it won't be useable after resuming) and so
|
||||||
|
will the upsmon client. Some drivers may work after resuming, but many
|
||||||
|
don't and some UPS'es will require re-initialization, so it's best not
|
||||||
|
to keep this running either.
|
||||||
|
|
||||||
|
After stopping driver, server and client you'll have to send the UPS
|
||||||
|
the command to shutdown only if the POWERDOWNFLAG is present. Note
|
||||||
|
that most likely you'll have to allow for a grace period after sending
|
||||||
|
'upsdrvctl shutdown' since the system will still have to take a
|
||||||
|
snapshot of itself after that. Not all drivers support this, so before
|
||||||
|
going down this road, make sure that the one you're using does.
|
||||||
|
|
||||||
|
RAID warning
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
If you run any sort of RAID equipment, make sure your arrays are either halted
|
||||||
|
(if possible) or switched to "read-only" mode. Otherwise you may suffer a long
|
||||||
|
resync once the system comes back up.
|
||||||
|
|
||||||
|
The kernel may not ever run its final shutdown procedure, so you must take care
|
||||||
|
of all array shutdowns in userspace before upsdrvctl runs.
|
||||||
|
|
||||||
|
If you use software RAID (md) on Linux, get mdadm and try using
|
||||||
|
'mdadm --readonly' to put your arrays in a safe state. This has to
|
||||||
|
happen after your shutdown scripts have remounted the filesystems.
|
||||||
|
|
||||||
|
On hardware RAID or other kernels, you have to do some detective work. It may
|
||||||
|
be necessary to contact the vendor or the author of your driver to find out
|
||||||
|
how to put the array in a state where a power loss won't leave it "dirty".
|
||||||
|
|
||||||
|
Our understanding is that most if not all RAID devices on Linux will be fine
|
||||||
|
unless there are pending writes. Make sure your filesystems are remounted
|
||||||
|
read-only and you should be covered.
|
||||||
|
|
||||||
|
|
||||||
|
[[DataRoom]]
|
||||||
|
Typical setups for enterprise networks and data rooms
|
||||||
|
-----------------------------------------------------
|
||||||
|
|
||||||
|
The split nature of this UPS monitoring software allows a wide variety of
|
||||||
|
power connections. This chapter will help you identify how things should
|
||||||
|
be configured using some general descriptions.
|
||||||
|
|
||||||
|
There are two main elements:
|
||||||
|
|
||||||
|
1. There's a UPS attached to a communication (serial, USB or network) port on
|
||||||
|
this system.
|
||||||
|
2. This system depends on a UPS for power.
|
||||||
|
|
||||||
|
You can play "mix and match" with those two to arrive at these descriptions
|
||||||
|
for individual hosts:
|
||||||
|
|
||||||
|
- A: 1 but not 2
|
||||||
|
- B: 2 but not 1
|
||||||
|
- C: 1 and 2
|
||||||
|
|
||||||
|
A small to medium sized data room usually has one C and a bunch of Bs.
|
||||||
|
This means that there's a system (type C) hooked to the UPS which depends
|
||||||
|
on it for power. There are also some other systems in there (type B)
|
||||||
|
which depend on that same UPS for power, but aren't directly connected to
|
||||||
|
it.
|
||||||
|
|
||||||
|
Larger data rooms or those with multiple UPSes may have several "clusters"
|
||||||
|
of the "single C, many Bs" depending on how it's all wired.
|
||||||
|
|
||||||
|
Finally, there's a special case. Type A systems are connected to a UPS's
|
||||||
|
serial port, but don't depend on it for power. This usually happens when
|
||||||
|
a UPS is physically close to a box and can reach the serial port, but
|
||||||
|
the wiring is such that it doesn't actually feed it.
|
||||||
|
|
||||||
|
Once you identify a system's type, use this list to decide which of the
|
||||||
|
programs need to be run for monitoring:
|
||||||
|
|
||||||
|
- A: driver and upsd
|
||||||
|
- B: upsmon (as slave)
|
||||||
|
- C: driver, upsd, and upsmon (as master)
|
||||||
|
|
||||||
|
To further complicate things, you can have a system that is hooked to
|
||||||
|
multiple UPSes, but only depends on one for power. This particular
|
||||||
|
situation makes it an "A" relative to one UPS, and a "C" relative to the
|
||||||
|
other. The software can handle this - you just have to tell it what to do.
|
||||||
|
|
||||||
|
NOTE: NUT can also serve as a data proxy to increase the number of clients,
|
||||||
|
or share the communication load between several upsd instances.
|
||||||
|
|
||||||
|
image:images/advanced.png[]
|
||||||
|
|
||||||
|
If you are running large server-class systems that have more than one
|
||||||
|
power feed, see the next section for information on how to handle it
|
||||||
|
properly.
|
||||||
|
|
||||||
|
[[BigServers]]
|
||||||
|
Typical setups for big servers with UPS redundancy
|
||||||
|
--------------------------------------------------
|
||||||
|
|
||||||
|
By using multiple MONITOR statements in upsmon.conf, you can configure an
|
||||||
|
environment where a large machine with redundant power monitors multiple
|
||||||
|
separate UPSes.
|
||||||
|
|
||||||
|
image:images/bigbox.png[]
|
||||||
|
|
||||||
|
Example configuration
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
For the examples in this section, we will use a server with four power supplies
|
||||||
|
installed.
|
||||||
|
|
||||||
|
Two UPS, 'Alpha' and 'Beta', are each driving two of the power supplies.
|
||||||
|
This means that either 'Alpha' *or* 'Beta' can totally shut down and the
|
||||||
|
server will be able to keep running.
|
||||||
|
|
||||||
|
The upsmon.conf configuration that reflect this is the following:
|
||||||
|
|
||||||
|
MONITOR ups-alpha@myhost 2 monuser mypass master
|
||||||
|
MONITOR ups-beta@myhost 2 monuser mypass master
|
||||||
|
MINSUPPLIES 2
|
||||||
|
|
||||||
|
With that configuration, upsmon will only shut down when both UPS reaches
|
||||||
|
a critical (on battery + low battery) condition, since 'Alpha' and 'Beta'
|
||||||
|
provide the same power value.
|
||||||
|
|
||||||
|
As an added bonus, this means you can move a running server from one UPS
|
||||||
|
to another (for maintenance purpose for example) without bringing it down since
|
||||||
|
the minimum power will be provided at all times.
|
||||||
|
|
||||||
|
The MINSUPPLIES line tells upsmon that we need at least 2 power supplies
|
||||||
|
to be receiving power from a good UPS (on line or on battery, just not
|
||||||
|
on battery and low battery).
|
||||||
|
|
||||||
|
NOTE: we could have used a 'Power Value' of 1 for both UPS, and MINSUPPLIES
|
||||||
|
set to 1 too. These values are purely arbitrary, so you are free to use your
|
||||||
|
own rules. Here, we have linked these values to the number of power supplies
|
||||||
|
that each UPS is feeding (2).
|
||||||
|
|
||||||
|
|
||||||
|
Multiple UPS shutdowns ordering
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
If you have multiple UPSes connected to your system, chances are that you
|
||||||
|
need to shut them down in a specific order. The goal is to shut down
|
||||||
|
everything but the one keeping upsmon alive at first, then you do that one
|
||||||
|
last.
|
||||||
|
|
||||||
|
To set the order in which your UPSes receive the shutdown commands, define
|
||||||
|
the 'sdorder' value in your ups.conf.
|
||||||
|
|
||||||
|
[bigone]
|
||||||
|
driver = usbhid-ups
|
||||||
|
port = auto
|
||||||
|
sdorder = 2
|
||||||
|
|
||||||
|
[littleguy]
|
||||||
|
driver = mge-shut
|
||||||
|
port = /dev/ttyS0
|
||||||
|
sdorder = 1
|
||||||
|
|
||||||
|
[misc]
|
||||||
|
driver = blazer_ser
|
||||||
|
port = /dev/ttyS1
|
||||||
|
sdorder = 0
|
||||||
|
|
||||||
|
The order runs from 0 to the highest number available. So, for this
|
||||||
|
configuration, the order of shutdowns would be 'misc', 'littleguy', and then
|
||||||
|
'bigone'.
|
||||||
|
|
||||||
|
NOTE: If you have a UPS that shouldn't be shutdown when running 'upsdrvctl
|
||||||
|
shutdown', set the *sdorder* to *-1*.
|
||||||
|
|
||||||
|
|
||||||
|
Other redundancy configurations
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
There are a lot of ways to handle redundancy and they all come down to how many
|
||||||
|
power supplies, power cords and independent UPS connections you have. A
|
||||||
|
system with a 1:1 cord:supply ratio has more wires stuffed behind it, but
|
||||||
|
it's much easier to move things around since any given UPS drives a smaller
|
||||||
|
percentage of the overall power.
|
||||||
|
|
||||||
|
More information can be found in the linkdoc:user-manual[NUT user manual],
|
||||||
|
and the various link:man/index.html[user manual pages].
|
|
@ -1,327 +1,345 @@
|
||||||
Desc: Configure options
|
ifdef::website[]
|
||||||
File: configure.txt
|
Configure options
|
||||||
Date: 24 December 2008
|
=================
|
||||||
Auth: Russell Kroll <rkroll@exploits.org>
|
endif::website[]
|
||||||
Auth: Peter Selinger <selinger@sourceforge.net>
|
|
||||||
Auth: Arnaud Quette <aquette.dev@gmail.com>
|
|
||||||
|
|
||||||
There are a few options that can be given to configure to tweak compiles.
|
There are a few options that can be given to configure to tweak compiles.
|
||||||
See also "./configure --help" for a current and complete listing.
|
See also "./configure --help" for a current and complete listing.
|
||||||
|
|
||||||
Contents:
|
Driver selection
|
||||||
=========
|
----------------
|
||||||
|
|
||||||
1. Driver selection
|
--with-serial
|
||||||
2. Optional features
|
|
||||||
3. Other configuration options
|
|
||||||
4. Installation directories
|
|
||||||
5. Directories used by NUT at run-time
|
|
||||||
6. Things the compiler might need to find
|
|
||||||
|
|
||||||
1. Driver selection:
|
Build and install the serial drivers (default: yes)
|
||||||
====================
|
|
||||||
|
|
||||||
--with-serial
|
--with-usb
|
||||||
|
|
||||||
Build and install the serial drivers (default: yes)
|
Build and install the USB drivers (default: auto-detect)
|
||||||
|
Note that you need to install the libusb development package or files.
|
||||||
|
|
||||||
--with-usb
|
--with-snmp
|
||||||
|
|
||||||
Build and install the USB drivers (default: auto-detect)
|
Build and install the SNMP drivers (default: auto-detect)
|
||||||
Note that you need to install the libusb development package or files.
|
Note that you need to install libsnmp development package or files.
|
||||||
|
|
||||||
--with-snmp
|
--with-neon
|
||||||
|
|
||||||
Build and install the SNMP drivers (default: auto-detect)
|
Build and install the XML drivers (default: auto-detect)
|
||||||
Note that you need to install libsnmp development package or files.
|
Note that you need to install neon development package or files.
|
||||||
|
|
||||||
--with-neon
|
--with-drivers=<driver>,<driver>,...
|
||||||
|
|
||||||
Build and install the XML drivers (default: auto-detect)
|
Specify exactly which driver or drivers to build and install (this
|
||||||
Note that you need to install neon development package or files.
|
works for serial, usb, and snmp drivers, and overrides the
|
||||||
|
preceding three options).
|
||||||
|
|
||||||
--with-drivers=<driver>,<driver>,...
|
As of the time of this writing (2010), there are 46 UPS drivers
|
||||||
|
available. Most users will only need one, a few will need two or
|
||||||
|
three, and very few people will need all of them.
|
||||||
|
|
||||||
Specify exactly which driver or drivers to build and install (this
|
To save time during the compile and disk space later on, you can
|
||||||
works for serial, usb, and snmp drivers, and overrides the
|
use this option to just build and install a subset of the drivers.
|
||||||
preceding three options).
|
To select mge-shut and usbhid-ups, you'd do this:
|
||||||
|
|
||||||
As of the time of this writing (2006), there are 47 UPS drivers
|
|
||||||
available. Most users will only need one, a few will need two or
|
|
||||||
three, and very few people will need all of them.
|
|
||||||
|
|
||||||
To save time during the compile and disk space later on, you can
|
|
||||||
use this option to just build and install a subset of the drivers.
|
|
||||||
To select apcsmart and usbhid-ups, you'd do this:
|
|
||||||
|
|
||||||
--with-drivers=apcsmart,usbhid-ups
|
--with-drivers=apcsmart,usbhid-ups
|
||||||
|
|
||||||
If you need to build more drivers later on, you will need to rerun
|
If you need to build more drivers later on, you will need to rerun
|
||||||
configure with a different list. To make it build all of the
|
configure with a different list. To make it build all of the
|
||||||
drivers from scratch again, run 'make clean' before starting.
|
drivers from scratch again, run 'make clean' before starting.
|
||||||
|
|
||||||
2. Optional features:
|
--with-doc=<output-format(s)> (default: no)
|
||||||
=====================
|
|
||||||
|
|
||||||
--with-cgi (default: no)
|
Build and install NUT documentation file(s).
|
||||||
|
The possible values are "html-single" for single page HTML, "html-chunked"
|
||||||
|
for multi pages HTML, "pdf" for a PDF file or "auto" to build all the
|
||||||
|
possible previous documentation formats.
|
||||||
|
Verbose output can be enabled using: ASCIIDOC_VERBOSE=-v make
|
||||||
|
|
||||||
Build and install the optional CGI programs, HTML files, and sample
|
This feature requires AsciiDoc 8.6.3 (http://www.methods.co.nz/asciidoc).
|
||||||
CGI configuration files. This is not enabled by default, as they
|
|
||||||
are only useful on web servers. See data/html/README for additional
|
|
||||||
information on how to set up CGI programs.
|
|
||||||
|
|
||||||
--with-lib (default: no)
|
|
||||||
|
|
||||||
Build and install the upsclient library and header files.
|
Optional features
|
||||||
|
-----------------
|
||||||
|
|
||||||
--with-all (no default)
|
--with-cgi (default: no)
|
||||||
|
|
||||||
Build and install all of the above (the serial, USB, and SNMP
|
Build and install the optional CGI programs, HTML files, and sample
|
||||||
drivers, the CGI programs and HTML files, and the upsclient
|
CGI configuration files. This is not enabled by default, as they
|
||||||
library).
|
are only useful on web servers. See data/html/README for additional
|
||||||
|
information on how to set up CGI programs.
|
||||||
|
|
||||||
--with-ssl (default: auto-detect)
|
--with-lib (default: no)
|
||||||
|
|
||||||
Enable SSL development code. Read docs/ssl.txt for instructions on
|
Build and install the upsclient library and header files.
|
||||||
SSL support.
|
|
||||||
|
|
||||||
--with-wrap (default: auto-detect)
|
--with-all (no default)
|
||||||
|
|
||||||
Enable libwrap (tcp-wrappers) support. Refer to upsd man page for
|
Build and install all of the above (the serial, USB, and SNMP
|
||||||
more information.
|
drivers, the CGI programs and HTML files, and the upsclient
|
||||||
|
library).
|
||||||
|
|
||||||
--with-ipv6 (default: auto-detect)
|
--with-ssl (default: auto-detect)
|
||||||
|
|
||||||
Enable IPv6 support.
|
Enable SSL development code. Read the section "Configuring SSL" in
|
||||||
|
docs/security.txt for instructions on SSL support.
|
||||||
|
|
||||||
--with-hal (default: no)
|
--with-wrap (default: auto-detect)
|
||||||
|
|
||||||
Build and install Hardware Abstraction Layer support.
|
Enable libwrap (tcp-wrappers) support. Refer to upsd man page for
|
||||||
If you own a USB unit, only protect your local system and run the
|
more information.
|
||||||
Gnome or KDE desktop, this will enable a full Plug & Play usage.
|
|
||||||
See docs/nut-hal.txt for additional information on how to set up
|
|
||||||
and use HAL support.
|
|
||||||
|
|
||||||
--with-powerman (default: auto-detect)
|
--with-ipv6 (default: auto-detect)
|
||||||
|
|
||||||
Build and install Powerman PDU client driver.
|
Enable IPv6 support.
|
||||||
This allows to interact with the Powerman daemon, and the numerous
|
|
||||||
Power Distribution Units (PDU) supported by the project.
|
|
||||||
|
|
||||||
3. Other configuration options:
|
--with-hal (default: no)
|
||||||
===============================
|
|
||||||
|
|
||||||
--with-port=PORT
|
Build and install Hardware Abstraction Layer support.
|
||||||
|
If you own a USB unit, only protect your local system and run the
|
||||||
|
Gnome or KDE desktop, this will enable a full Plug & Play usage.
|
||||||
|
See docs/nut-hal.txt for additional information on how to set up
|
||||||
|
and use HAL support.
|
||||||
|
|
||||||
|
--with-powerman (default: auto-detect)
|
||||||
|
|
||||||
Change the TCP port used by the network code. Default is 3493.
|
Build and install Powerman PDU client driver.
|
||||||
|
This allows to interact with the Powerman daemon, and the numerous
|
||||||
|
Power Distribution Units (PDU) supported by the project.
|
||||||
|
|
||||||
Ancient versions of upsd used port 3305. NUT 2.0 and up use a
|
|
||||||
substantially different network protocol and are not able to
|
|
||||||
communicate with anything older than the 1.4 series.
|
|
||||||
|
|
||||||
If you have to monitor a mixed environment, use the last 1.4 version,
|
Other configuration options
|
||||||
as it contains compatibility code for both the old "REQ" and the new
|
---------------------------
|
||||||
"GET" versions of the protocol.
|
|
||||||
|
|
||||||
--with-user=<username>
|
--with-port=PORT
|
||||||
--with-group=<groupname>
|
|
||||||
|
|
||||||
Programs started as root will setuid() to <username> for somewhat
|
Change the TCP port used by the network code. Default is 3493.
|
||||||
safer operation. You can override this with -u <user> in several
|
|
||||||
programs, including upsdrvctl (and all drivers by extension), upsd,
|
|
||||||
and upsmon. The "user" directive in ups.conf overrides this at run
|
|
||||||
time for the drivers.
|
|
||||||
|
|
||||||
Note: upsmon does not totally drop root because it may need to
|
Ancient versions of upsd used port 3305. NUT 2.0 and up use a
|
||||||
initiate a shutdown. There is always at least a stub process
|
substantially different network protocol and are not able to
|
||||||
remaining with root powers. The network code runs in another
|
communicate with anything older than the 1.4 series.
|
||||||
(separate) process as the new user.
|
|
||||||
|
|
||||||
The <groupname> is used for the permissions of some files,
|
If you have to monitor a mixed environment, use the last 1.4 version,
|
||||||
particularly the hotplugging rules for USB. The idea is that the
|
as it contains compatibility code for both the old "REQ" and the new
|
||||||
device files for any UPS devices should be readable and writable by
|
"GET" versions of the protocol.
|
||||||
members of that group.
|
|
||||||
|
|
||||||
The default value for both the username and groupname is "nobody".
|
--with-user=<username>
|
||||||
This was done since it's slightly better than staying around as
|
--with-group=<groupname>
|
||||||
root. Running things as nobody is not a good idea, since it's a
|
|
||||||
hack for NFS access. You should create at least one separate user
|
|
||||||
for this software.
|
|
||||||
|
|
||||||
If you use one of the --with-user and --with-group options, then
|
Programs started as root will setuid() to <username> for somewhat
|
||||||
you have to use the other one too.
|
safer operation. You can override this with -u <user> in several
|
||||||
|
programs, including upsdrvctl (and all drivers by extension), upsd,
|
||||||
|
and upsmon. The "user" directive in ups.conf overrides this at run
|
||||||
|
time for the drivers.
|
||||||
|
|
||||||
See the INSTALL document and the FAQ for more on this topic.
|
NOTE: upsmon does not totally drop root because it may need to
|
||||||
|
initiate a shutdown. There is always at least a stub process
|
||||||
|
remaining with root powers. The network code runs in another
|
||||||
|
(separate) process as the new user.
|
||||||
|
|
||||||
--with-logfacility=FACILITY
|
The <groupname> is used for the permissions of some files,
|
||||||
|
particularly the hotplugging rules for USB. The idea is that the
|
||||||
|
device files for any UPS devices should be readable and writable by
|
||||||
|
members of that group.
|
||||||
|
|
||||||
Change the facility used when writing to the log file. Read the man
|
The default value for both the username and groupname is "nobody".
|
||||||
page for openlog to get some idea of what's available on your system.
|
This was done since it's slightly better than staying around as
|
||||||
Default is LOG_DAEMON.
|
root. Running things as nobody is not a good idea, since it's a
|
||||||
|
hack for NFS access. You should create at least one separate user
|
||||||
|
for this software.
|
||||||
|
|
||||||
4. Installation directories:
|
If you use one of the --with-user and --with-group options, then
|
||||||
============================
|
you have to use the other one too.
|
||||||
|
|
||||||
--prefix=PATH
|
See the INSTALL document and the FAQ for more on this topic.
|
||||||
|
|
||||||
This is a fairly standard option with GNU autoconf, and it sets the
|
--with-logfacility=FACILITY
|
||||||
base path for most of the other install directories. The default
|
|
||||||
is /usr/local/ups, which puts everything but the state sockets in one
|
|
||||||
easy place.
|
|
||||||
|
|
||||||
If you like having things to be at more of a "system" level, setting
|
Change the facility used when writing to the log file. Read the man
|
||||||
the prefix to /usr/local or even /usr might be better.
|
page for openlog to get some idea of what's available on your system.
|
||||||
|
Default is LOG_DAEMON.
|
||||||
|
|
||||||
--exec_prefix=PATH
|
|
||||||
|
|
||||||
This sets the base path for architecture dependent files. By
|
Installation directories
|
||||||
default, it is the same as <prefix>.
|
------------------------
|
||||||
|
|
||||||
--sysconfdir=PATH
|
--prefix=PATH
|
||||||
|
|
||||||
Changes the location where NUT's configuration files are stored.
|
This is a fairly standard option with GNU autoconf, and it sets the
|
||||||
By default this path is <prefix>/etc. Setting this to /etc or
|
base path for most of the other install directories. The default
|
||||||
/etc/ups might be useful.
|
is /usr/local/ups, which puts everything but the state sockets in one
|
||||||
|
easy place.
|
||||||
|
|
||||||
The NUT_CONFPATH environment variable overrides this at run time.
|
If you like having things to be at more of a "system" level, setting
|
||||||
|
the prefix to /usr/local or even /usr might be better.
|
||||||
|
|
||||||
--bindir=PATH
|
--exec_prefix=PATH
|
||||||
--sbindir=PATH
|
|
||||||
|
|
||||||
Where executable files will be installed. Files that are normally
|
This sets the base path for architecture dependent files. By
|
||||||
executed by root (upsd, upsmon, upssched) go to sbindir, all others
|
default, it is the same as <prefix>.
|
||||||
to bindir. The defaults are <exec_prefix>/bin and <exec_prefix>/sbin.
|
|
||||||
|
|
||||||
--datadir=PATH
|
--sysconfdir=PATH
|
||||||
|
|
||||||
Change the data directory, i.e., where architecture independent
|
Changes the location where NUT's configuration files are stored.
|
||||||
read-only data is installed. By default this is <prefix>/share,
|
By default this path is <prefix>/etc. Setting this to /etc or
|
||||||
i.e., /usr/local/ups/share. At the moment, this directory only
|
/etc/ups might be useful.
|
||||||
holds two files - the optional cmdvartab and driver.list.
|
|
||||||
|
|
||||||
--mandir=PATH
|
The NUT_CONFPATH environment variable overrides this at run time.
|
||||||
|
|
||||||
Sets the base directories for the man pages. The default is
|
--bindir=PATH
|
||||||
<prefix>/man, i.e., /usr/local/ups/man.
|
--sbindir=PATH
|
||||||
|
|
||||||
--includedir=PATH
|
Where executable files will be installed. Files that are normally
|
||||||
|
executed by root (upsd, upsmon, upssched) go to sbindir, all others
|
||||||
|
to bindir. The defaults are <exec_prefix>/bin and <exec_prefix>/sbin.
|
||||||
|
|
||||||
Sets the path for include files to be installed when --with-lib is
|
--datadir=PATH
|
||||||
selected. For example, upsclient.h is installed here. The default
|
|
||||||
is <prefix>/include.
|
|
||||||
|
|
||||||
--libdir=PATH
|
Change the data directory, i.e., where architecture independent
|
||||||
|
read-only data is installed. By default this is <prefix>/share,
|
||||||
|
i.e., /usr/local/ups/share. At the moment, this directory only
|
||||||
|
holds two files - the optional cmdvartab and driver.list.
|
||||||
|
|
||||||
Sets the installation path for libraries. This is just the
|
--mandir=PATH
|
||||||
upsclient library for now. The default is <exec_prefix>/lib.
|
|
||||||
|
|
||||||
--with-drvpath=PATH
|
Sets the base directories for the man pages. The default is
|
||||||
|
<prefix>/man, i.e., /usr/local/ups/man.
|
||||||
|
|
||||||
The UPS drivers will be installed to this path. By default they
|
--includedir=PATH
|
||||||
install to "<exec_prefix>/bin", i.e., /usr/local/ups/bin.
|
|
||||||
|
|
||||||
The "driverpath" global directive in the ups.conf file overrides this
|
Sets the path for include files to be installed when --with-lib is
|
||||||
at run time.
|
selected. For example, upsclient.h is installed here. The default
|
||||||
|
is <prefix>/include.
|
||||||
|
|
||||||
--with-cgipath=PATH
|
--libdir=PATH
|
||||||
|
|
||||||
The CGI programs will be installed to this path. By default, they
|
Sets the installation path for libraries. This is just the
|
||||||
install to "<exec_prefix>/cgi-bin", which is usually /usr/local/ups/cgi-bin.
|
upsclient library for now. The default is <exec_prefix>/lib.
|
||||||
|
|
||||||
If you set the prefix to something like /usr, you should set the
|
--with-drvpath=PATH
|
||||||
cgipath to something else, because /usr/cgi-bin is pretty ugly and
|
|
||||||
non-standard.
|
|
||||||
|
|
||||||
The CGI programs are not built or installed by default. Use
|
The UPS drivers will be installed to this path. By default they
|
||||||
"./configure --with-cgi" to request that they are built and
|
install to "<exec_prefix>/bin", i.e., /usr/local/ups/bin.
|
||||||
installed.
|
|
||||||
|
|
||||||
--with-htmlpath=PATH
|
The "driverpath" global directive in the ups.conf file overrides this
|
||||||
|
at run time.
|
||||||
|
|
||||||
HTML files will be installed to this path. By default, this is
|
--with-cgipath=PATH
|
||||||
"<prefix>/html". Note that HTML files are only installed if
|
|
||||||
--with-cgi is selected.
|
|
||||||
|
|
||||||
--with-pkgconfig-dir=PATH
|
The CGI programs will be installed to this path. By default, they
|
||||||
|
install to "<exec_prefix>/cgi-bin", which is usually /usr/local/ups/cgi-bin.
|
||||||
|
|
||||||
Where to install pkg-config *.pc files. This option only has an
|
If you set the prefix to something like /usr, you should set the
|
||||||
effect if --with-lib is selected, and causes a pkg-config file to
|
cgipath to something else, because /usr/cgi-bin is pretty ugly and
|
||||||
be installed in the named location. The default is
|
non-standard.
|
||||||
<exec_prefix>/pkgconfig.
|
|
||||||
|
|
||||||
Use --without-pkgconfig-dir to disable this feature altogether.
|
The CGI programs are not built or installed by default. Use
|
||||||
|
"./configure --with-cgi" to request that they are built and
|
||||||
|
installed.
|
||||||
|
|
||||||
--with-hotplug-dir=PATH
|
--with-htmlpath=PATH
|
||||||
|
|
||||||
Where to install Linux 2.4 hotplugging rules. The default is
|
HTML files will be installed to this path. By default, this is
|
||||||
/etc/hotplug, if that directory exists, and not to install it
|
"<prefix>/html". Note that HTML files are only installed if
|
||||||
otherwise. Note that this installation directory is not a
|
--with-cgi is selected.
|
||||||
subdirectory of <prefix> by default. When installing NUT as a
|
|
||||||
non-root user, you may have to override this option.
|
|
||||||
|
|
||||||
Use --without-hotplug-dir to disable this feature altogether.
|
--with-pkgconfig-dir=PATH
|
||||||
|
|
||||||
--with-udev-dir=PATH
|
Where to install pkg-config *.pc files. This option only has an
|
||||||
|
effect if --with-lib is selected, and causes a pkg-config file to
|
||||||
|
be installed in the named location. The default is
|
||||||
|
<exec_prefix>/pkgconfig.
|
||||||
|
|
||||||
Where to install Linux 2.6 hotplugging rules, for kernels that have
|
Use --without-pkgconfig-dir to disable this feature altogether.
|
||||||
the "udev" mechanism. The default is /etc/udev, if that directory
|
|
||||||
exists, and not to install it otherwise. Note that this
|
|
||||||
installation directory is not a subdirectory of <prefix> by
|
|
||||||
default. When installing NUT as a non-root user, you may have to
|
|
||||||
override this option.
|
|
||||||
|
|
||||||
Use --without-udev-dir to disable this feature altogether.
|
--with-hotplug-dir=PATH
|
||||||
|
|
||||||
5. Directories used by NUT at run-time:
|
Where to install Linux 2.4 hotplugging rules. The default is
|
||||||
=======================================
|
/etc/hotplug, if that directory exists, and not to install it
|
||||||
|
otherwise. Note that this installation directory is not a
|
||||||
|
subdirectory of <prefix> by default. When installing NUT as a
|
||||||
|
non-root user, you may have to override this option.
|
||||||
|
|
||||||
--with-pidpath=PATH
|
Use --without-hotplug-dir to disable this feature altogether.
|
||||||
|
|
||||||
Changes the directory where pid files are stored. By default this is
|
--with-udev-dir=PATH
|
||||||
/var/run. Certain programs like upsmon will leave files here.
|
|
||||||
|
|
||||||
--with-altpidpath=PATH
|
Where to install Linux 2.6 hotplugging rules, for kernels that have
|
||||||
|
the "udev" mechanism. The default is /etc/udev, if that directory
|
||||||
|
exists, and not to install it otherwise. Note that this
|
||||||
|
installation directory is not a subdirectory of <prefix> by
|
||||||
|
default. When installing NUT as a non-root user, you may have to
|
||||||
|
override this option.
|
||||||
|
|
||||||
Programs that normally don't have root powers, like the drivers and
|
Use --without-udev-dir to disable this feature altogether.
|
||||||
upsd, write their pid files here. By default this is whatever the
|
|
||||||
statepath is, as those programs should be able to write there.
|
|
||||||
|
|
||||||
--with-statepath=PATH
|
|
||||||
|
|
||||||
Change the default location of the state sockets created by the
|
Directories used by NUT at run-time
|
||||||
drivers.
|
-----------------------------------
|
||||||
|
|
||||||
The NUT_STATEPATH environment variable overrides this at run time.
|
--with-pidpath=PATH
|
||||||
|
|
||||||
Default is /var/state/ups.
|
Changes the directory where pid files are stored. By default this is
|
||||||
|
/var/run. Certain programs like upsmon will leave files here.
|
||||||
|
|
||||||
6. Things the compiler might need to find:
|
--with-altpidpath=PATH
|
||||||
==========================================
|
|
||||||
|
|
||||||
--with-gd-includes="-I/foo/bar"
|
Programs that normally don't have root powers, like the drivers and
|
||||||
|
upsd, write their pid files here. By default this is whatever the
|
||||||
|
statepath is, as those programs should be able to write there.
|
||||||
|
|
||||||
If you installed gd in some place where your C preprocessor can't
|
--with-statepath=PATH
|
||||||
find the header files, use this switch to add additional -I flags.
|
|
||||||
|
|
||||||
--with-gd-libs="-L/foo/bar -labcd -lxyz"
|
Change the default location of the state sockets created by the
|
||||||
|
drivers.
|
||||||
|
|
||||||
If your copy of gd isn't linking properly, use this to give the
|
The NUT_STATEPATH environment variable overrides this at run time.
|
||||||
proper -L and -l flags to make it work. See LIBS= in gd's Makefile.
|
|
||||||
|
|
||||||
Note: the --with-gd switches are not necessary if you have gd 2.0.8
|
Default is /var/state/ups.
|
||||||
or higher installed properly. The gdlib-config script will be
|
|
||||||
detected and used by default in that situation.
|
|
||||||
|
|
||||||
--with-ssl-includes, --with-usb-includes, --with-snmp-includes,
|
|
||||||
--with-neon-includes, --with-powerman-includes="-I/foo/bar"
|
|
||||||
|
|
||||||
If your system doesn't have pkg-config and support for any of the
|
Things the compiler might need to find
|
||||||
above libraries isn't found (but you know it is installed), you must
|
--------------------------------------
|
||||||
specify the compiler flags that are needed.
|
|
||||||
|
|
||||||
--with-ssl-libs, --with-usb-libs, --with-snmp-libs,
|
--with-gd-includes="-I/foo/bar"
|
||||||
--with-neon-libs, --with-powerman-libs="-L/foo/bar -labcd -lxyz"
|
|
||||||
|
|
||||||
If your system doesn't have pkg-config and support for any of the
|
If you installed gd in some place where your C preprocessor can't
|
||||||
above libraries isn't found (but you know it is installed), you must
|
find the header files, use this switch to add additional -I flags.
|
||||||
specify the linker flags that are needed.
|
|
||||||
|
--with-gd-libs="-L/foo/bar -labcd -lxyz"
|
||||||
|
|
||||||
|
If your copy of gd isn't linking properly, use this to give the
|
||||||
|
proper -L and -l flags to make it work. See LIBS= in gd's Makefile.
|
||||||
|
|
||||||
|
NOTE: the --with-gd switches are not necessary if you have gd 2.0.8
|
||||||
|
or higher installed properly. The gdlib-config script will be
|
||||||
|
detected and used by default in that situation.
|
||||||
|
|
||||||
|
--with-ssl-includes, --with-usb-includes, --with-snmp-includes,
|
||||||
|
--with-neon-includes, --with-powerman-includes="-I/foo/bar"
|
||||||
|
|
||||||
|
If your system doesn't have pkg-config and support for any of the above
|
||||||
|
libraries isn't found (but you know it is installed), you must specify the
|
||||||
|
compiler flags that are needed.
|
||||||
|
|
||||||
|
--with-ssl-libs, --with-usb-libs, --with-snmp-libs,
|
||||||
|
--with-neon-libs, --with-powerman-libs="-L/foo/bar -labcd -lxyz"
|
||||||
|
|
||||||
|
If your system doesn't have pkg-config and support for any of the above
|
||||||
|
libraries isn't found (but you know it is installed), you must specify the
|
||||||
|
linker flags that are needed.
|
||||||
|
|
||||||
|
HAL addons (deprecated)
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
--with-hal-includes="-DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal \
|
||||||
|
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include"
|
||||||
|
--with-hal-libs="-lhal -ldbus-1 -lpthread"
|
||||||
|
--with-hal-user="haldaemon"
|
||||||
|
--with-hal-device-match-key="info.bus"
|
||||||
|
--with-hal-callouts-path="${libdir}/hal"
|
||||||
|
--with-hal-fdi-path="${datarootdir}/hal/fdi/information/20thirdparty"
|
||||||
|
|
||||||
|
If system doesn't have pkg-config or it fails to provides hints for some of the
|
||||||
|
settings that are needed to set it up properly and the build in defaults are
|
||||||
|
not right, you can specify the right variables here.
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
Desc: Contact closure hardware
|
Contact closure hardware information
|
||||||
File: contact-closure.txt
|
------------------------------------
|
||||||
Date: 14 March 2004
|
|
||||||
Auth: Russell Kroll <rkroll@exploits.org>
|
|
||||||
|
|
||||||
This is a collection of notes that apply to contact closure UPS
|
This is a collection of notes that apply to contact closure UPS
|
||||||
hardware, specifically those monitored by the genericups driver.
|
hardware, specifically those monitored by the genericups driver.
|
||||||
|
|
||||||
Definitions
|
Definitions
|
||||||
-----------
|
~~~~~~~~~~~
|
||||||
|
|
||||||
"Contact closure" refers to a situation where one line is connected to
|
"Contact closure" refers to a situation where one line is connected to
|
||||||
another inside UPS hardware to indicate some sort of situation. These
|
another inside UPS hardware to indicate some sort of situation. These
|
||||||
|
@ -25,7 +23,7 @@ not require cable power. These signals just appear on the right lines
|
||||||
without any special configuration on the PC side.
|
without any special configuration on the PC side.
|
||||||
|
|
||||||
Bad levels
|
Bad levels
|
||||||
----------
|
~~~~~~~~~~
|
||||||
|
|
||||||
Some evil cabling and UPS equipment uses the transmit or receive lines
|
Some evil cabling and UPS equipment uses the transmit or receive lines
|
||||||
as their reference points for these signals. This is not sufficient to
|
as their reference points for these signals. This is not sufficient to
|
||||||
|
@ -34,7 +32,7 @@ reading certain signals on your system, make sure your UPS isn't trying
|
||||||
to do this.
|
to do this.
|
||||||
|
|
||||||
Signals
|
Signals
|
||||||
-------
|
~~~~~~~
|
||||||
|
|
||||||
Unlike their smarter cousins, this kind of UPS can only give you very
|
Unlike their smarter cousins, this kind of UPS can only give you very
|
||||||
simple yes/no answers. Due to the limited number of serial port lines
|
simple yes/no answers. Due to the limited number of serial port lines
|
||||||
|
@ -53,7 +51,7 @@ a way that it only works when running on battery. Most hardware or
|
||||||
cabling will ignore the shutdown signal when running on line power.
|
cabling will ignore the shutdown signal when running on line power.
|
||||||
|
|
||||||
New genericups types
|
New genericups types
|
||||||
--------------------
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
If none of the existing types in the genericups driver work completely,
|
If none of the existing types in the genericups driver work completely,
|
||||||
make a note of which ones (if any) manage to work partially. This can
|
make a note of which ones (if any) manage to work partially. This can
|
||||||
|
@ -76,15 +74,15 @@ When editing the genericups.h, the values have the following meanings:
|
||||||
|
|
||||||
Outgoing lines:
|
Outgoing lines:
|
||||||
|
|
||||||
line_norm = what to set to make the line "normal" - i.e. cable power
|
- line_norm = what to set to make the line "normal" - i.e. cable power
|
||||||
line_sd = what to set to make the UPS shut down the load
|
- line_sd = what to set to make the UPS shut down the load
|
||||||
|
|
||||||
Incoming lines:
|
Incoming lines:
|
||||||
|
|
||||||
line_ol = flag that appears for on line / on battery
|
- line_ol = flag that appears for on line / on battery
|
||||||
val_ol = value of that flag when the UPS is on battery
|
- val_ol = value of that flag when the UPS is on battery
|
||||||
line_bl = flag that appears for low battery / battery OK
|
- line_bl = flag that appears for low battery / battery OK
|
||||||
val_bl = value of that flag when the battery is low
|
- val_bl = value of that flag when the battery is low
|
||||||
|
|
||||||
This may seem a bit confusing to have two variables per value that
|
This may seem a bit confusing to have two variables per value that
|
||||||
we want to read, but here's how it works. If you set line_ol to
|
we want to read, but here's how it works. If you set line_ol to
|
||||||
|
@ -95,14 +93,15 @@ the result will be 0.
|
||||||
|
|
||||||
So, if line_ol = foo, then val_ol can only be foo or 0.
|
So, if line_ol = foo, then val_ol can only be foo or 0.
|
||||||
|
|
||||||
As a general case, if line_ol == val_ol, then the value you're reading
|
As a general case, if 'line_ol == val_ol', then the value you're reading
|
||||||
is active high. Otherwise, it's active low. Check out the guts of
|
is active high. Otherwise, it's active low. Check out the guts of
|
||||||
upsdrv_updateinfo() to see how it really works.
|
upsdrv_updateinfo() to see how it really works.
|
||||||
|
|
||||||
Custom definitions
|
Custom definitions
|
||||||
------------------
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Late in the 1.3 cycle, a feature was merged which allows you to create
|
Late in the 1.3 cycle, a feature was merged which allows you to create
|
||||||
custom monitoring settings without editing the model table. Just set
|
custom monitoring settings without editing the model table. Just set
|
||||||
upstype to something close, then use settings in ups.conf to adjust the
|
upstype to something close, then use settings in ups.conf to adjust the
|
||||||
rest. See the genericups man page for more details.
|
rest. See the linkman:genericups[8] man page for more
|
||||||
|
details.
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
Desc: Typical setups for data rooms
|
|
||||||
File: data-room.txt
|
|
||||||
Date: 27 May 2002
|
|
||||||
Auth: Russell Kroll <rkroll@exploits.org>
|
|
||||||
|
|
||||||
The split nature of this UPS monitoring software allows a wide variety of
|
|
||||||
power connections. This document will help you identify how things should
|
|
||||||
be configured using some general descriptions.
|
|
||||||
|
|
||||||
There are two main elements:
|
|
||||||
|
|
||||||
1. There's a UPS attached to a serial port on this system.
|
|
||||||
2. This system depends on a UPS for power.
|
|
||||||
|
|
||||||
You can play "mix and match" with those two to arrive at these descriptions
|
|
||||||
for individual hosts:
|
|
||||||
|
|
||||||
A: 1 but not 2
|
|
||||||
B: 2 but not 1
|
|
||||||
C: 1 and 2
|
|
||||||
|
|
||||||
A small to medium sized data room usually has one C and a bunch of Bs.
|
|
||||||
This means that there's a system (type C) hooked to the UPS which depends
|
|
||||||
on it for power. There are also some other systems in there (type B)
|
|
||||||
which depend on that same UPS for power, but aren't directly connected to
|
|
||||||
it.
|
|
||||||
|
|
||||||
Larger data rooms or those with multiple UPSes may have several "clusters"
|
|
||||||
of the "single C, many Bs" depending on how it's all wired.
|
|
||||||
|
|
||||||
Finally, there's a special case. Type A systems are connected to a UPS's
|
|
||||||
serial port, but don't depend on it for power. This usually happens when
|
|
||||||
a UPS is physically close to a box and can reach the serial port, but
|
|
||||||
the wiring is such that it doesn't actually feed it.
|
|
||||||
|
|
||||||
Once you identify a system's type, use this list to decide which of the
|
|
||||||
programs need to be run for monitoring:
|
|
||||||
|
|
||||||
A: driver and upsd
|
|
||||||
B: upsmon (as slave)
|
|
||||||
C: driver, upsd, and upsmon (as master)
|
|
||||||
|
|
||||||
To further complicate things, you can have a system that is hooked to
|
|
||||||
multiple UPSes, but only depends on one for power. This particular
|
|
||||||
situation makes it an "A" relative to one UPS, and a "C" relative to the
|
|
||||||
other. The software can handle this - you just have to tell it what to
|
|
||||||
do.
|
|
||||||
|
|
||||||
Multi-power supply boxes
|
|
||||||
========================
|
|
||||||
|
|
||||||
If you are running large server-class systems that have more than one
|
|
||||||
power feed, see big-servers.txt for information on how to handle it
|
|
||||||
properly.
|
|
|
@ -1,34 +1,21 @@
|
||||||
Desc: Network UPS Tools design document
|
NUT design document
|
||||||
File: design.txt
|
===================
|
||||||
Date: 14 March 2004
|
|
||||||
Auth: Russell Kroll <rkroll@exploits.org>
|
|
||||||
|
|
||||||
This software is designed around a layered scheme with drivers, a
|
This software is designed around a layered scheme with drivers, a
|
||||||
server and clients. These layers communicate with text-based
|
server and clients. These layers communicate with text-based
|
||||||
protocols for easier maintenance and diagnostics.
|
protocols for easier maintenance and diagnostics.
|
||||||
|
|
||||||
The layering
|
The layering
|
||||||
============
|
------------
|
||||||
|
|
||||||
CLIENTS: upsmon, upsc, upsrw, upsstats, upsset, etc. (via upsclient)
|
image:images/nut_layering.png[NUT layering]
|
||||||
|
|
||||||
< network: TCP sockets, typically on port 3493 >
|
|
||||||
|
|
||||||
SERVER: upsd
|
|
||||||
|
|
||||||
< Unix domain sockets with text-based messages >
|
|
||||||
|
|
||||||
DRIVERS: apcsmart, bestups, powercom, etc.
|
|
||||||
|
|
||||||
< serial communications, SNMP, USB, etc. >
|
|
||||||
|
|
||||||
EQUIPMENT: Smart-UPS 700, Fenton PowerPal 660, etc. (actual UPS hardware)
|
|
||||||
|
|
||||||
How information gets around
|
How information gets around
|
||||||
===========================
|
---------------------------
|
||||||
|
|
||||||
From the equipment
|
From the equipment
|
||||||
------------------
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
DRIVERS talk to the EQUIPMENT and receive updates. For most hardware this
|
DRIVERS talk to the EQUIPMENT and receive updates. For most hardware this
|
||||||
is polled (DRIVER asks EQUIPMENT about a variable), but forced updates are
|
is polled (DRIVER asks EQUIPMENT about a variable), but forced updates are
|
||||||
|
@ -36,7 +23,7 @@ also possible. The exact method is not important, as it is abstracted
|
||||||
by the driver.
|
by the driver.
|
||||||
|
|
||||||
From the driver
|
From the driver
|
||||||
---------------
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The core of all DRIVERS maintains internal storage for every variable
|
The core of all DRIVERS maintains internal storage for every variable
|
||||||
that is known along with the auxiliary data for those variables. It
|
that is known along with the auxiliary data for those variables. It
|
||||||
|
@ -55,7 +42,7 @@ It continues to listen on the socket for additional updates.
|
||||||
This protocol is documented in sock-protocol.txt.
|
This protocol is documented in sock-protocol.txt.
|
||||||
|
|
||||||
From the server
|
From the server
|
||||||
---------------
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The SERVER's internal storage maintains a complete copy of the data
|
The SERVER's internal storage maintains a complete copy of the data
|
||||||
which is in the DRIVER, so it is capable of answering any request
|
which is in the DRIVER, so it is capable of answering any request
|
||||||
|
@ -66,7 +53,7 @@ requested data if it is available.
|
||||||
The format for requests from the CLIENT is documented in protocol.txt.
|
The format for requests from the CLIENT is documented in protocol.txt.
|
||||||
|
|
||||||
Instant commands
|
Instant commands
|
||||||
================
|
----------------
|
||||||
|
|
||||||
Instant commands is the term given to a set of actions that result in
|
Instant commands is the term given to a set of actions that result in
|
||||||
something happening to the UPS. Some of the common ones are
|
something happening to the UPS. Some of the common ones are
|
||||||
|
@ -86,7 +73,7 @@ timing issues. Remember that upsd services clients in a round-robin
|
||||||
fashion, so all queries must be lightweight and speedy.
|
fashion, so all queries must be lightweight and speedy.
|
||||||
|
|
||||||
Setting variables
|
Setting variables
|
||||||
=================
|
-----------------
|
||||||
|
|
||||||
Some variables in the DRIVER or EQUIPMENT can be changed, and carry the
|
Some variables in the DRIVER or EQUIPMENT can be changed, and carry the
|
||||||
FLAG_RW flag. Upon receiving a SET command from the CLIENT, the SERVER
|
FLAG_RW flag. Upon receiving a SET command from the CLIENT, the SERVER
|
||||||
|
@ -102,7 +89,7 @@ command's completion from the DRIVER. This, too, is planned for a future
|
||||||
release.
|
release.
|
||||||
|
|
||||||
Example data path
|
Example data path
|
||||||
=================
|
-----------------
|
||||||
|
|
||||||
Here's the path a piece of data might take through this architecture.
|
Here's the path a piece of data might take through this architecture.
|
||||||
The event is a UPS going on battery, and the final result is a pager
|
The event is a UPS going on battery, and the final result is a pager
|
||||||
|
@ -171,13 +158,12 @@ This scenario requires some configuration, obviously:
|
||||||
|
|
||||||
CMDSCRIPT /path/to/upssched-cmd
|
CMDSCRIPT /path/to/upssched-cmd
|
||||||
|
|
||||||
8. upssched-cmd knows what to do with "upsonbatt" as its first argument
|
9. upssched-cmd knows what to do with "upsonbatt" as its first argument
|
||||||
(A quick case..esac construct, see the examples)
|
(A quick case..esac construct, see the examples)
|
||||||
|
|
||||||
==============================================================================
|
|
||||||
|
|
||||||
History
|
History
|
||||||
=======
|
-------
|
||||||
|
|
||||||
The oldest versions of this software (1998) had no separation between
|
The oldest versions of this software (1998) had no separation between
|
||||||
the driver and the network server and only supported the latest APC
|
the driver and the network server and only supported the latest APC
|
||||||
|
|
115
docs/developer-guide.txt
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
:titles.underlines: "__","==","--","~~","^^"
|
||||||
|
|
||||||
|
Network UPS Tools Developer Guide
|
||||||
|
_________________________________
|
||||||
|
:Author: Russell_Kroll,_Arnaud_Quette,_Charles_Lepple_and_Peter_Selinger
|
||||||
|
:Author Initials: RK, AQ, CL & PS
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
============
|
||||||
|
|
||||||
|
NUT is both a powerful toolkit and framework that provides support for Power
|
||||||
|
Devices, such as Uninterruptible Power Supplies, Power Distribution Units
|
||||||
|
and Solar Controllers.
|
||||||
|
|
||||||
|
This document intend to describe how NUT is designed, and the way to
|
||||||
|
develop new device drivers and client applications.
|
||||||
|
|
||||||
|
|
||||||
|
[[design]]
|
||||||
|
|
||||||
|
include::design.txt[]
|
||||||
|
|
||||||
|
|
||||||
|
[[developers]]
|
||||||
|
|
||||||
|
include::developers.txt[]
|
||||||
|
|
||||||
|
|
||||||
|
[[new-drivers]]
|
||||||
|
|
||||||
|
include::new-drivers.txt[]
|
||||||
|
|
||||||
|
|
||||||
|
[[sock-protocol]]
|
||||||
|
|
||||||
|
include::sock-protocol.txt[]
|
||||||
|
|
||||||
|
|
||||||
|
[[augeas]]
|
||||||
|
|
||||||
|
include::../scripts/augeas/README[]
|
||||||
|
|
||||||
|
[[new-clients]]
|
||||||
|
|
||||||
|
include::new-clients.txt[]
|
||||||
|
|
||||||
|
|
||||||
|
[[net-protocol]]
|
||||||
|
|
||||||
|
include::net-protocol.txt[]
|
||||||
|
|
||||||
|
|
||||||
|
[[dev-tools]]
|
||||||
|
|
||||||
|
NUT developers tools
|
||||||
|
====================
|
||||||
|
|
||||||
|
NUT provides several tools for clients and core developers, and QA people.
|
||||||
|
|
||||||
|
Device simulation
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
The dummy-ups driver propose a simulation mode, also known as 'Dummy Mode'.
|
||||||
|
This mode allows to simulate any kind of devices, even non existing ones.
|
||||||
|
|
||||||
|
Using this method, you can either replay a real life sequence,
|
||||||
|
<<dev-recording,recorded from an actual device>>, or directly interact
|
||||||
|
through upsrw or by editing the device file.
|
||||||
|
|
||||||
|
For more information, refer to linkman:dummy-ups[8]
|
||||||
|
manual page.
|
||||||
|
|
||||||
|
|
||||||
|
[[dev-recording]]
|
||||||
|
|
||||||
|
Device recording
|
||||||
|
----------------
|
||||||
|
|
||||||
|
To complete dummy-ups, NUT provides a device recorder script called
|
||||||
|
'device-recorder.sh' and located in the 'tools/' directory of the
|
||||||
|
NUT source tree.
|
||||||
|
|
||||||
|
This script uses 'upsc' to record device information, and stores
|
||||||
|
these in a differential fashion every 5 seconds (by default).
|
||||||
|
|
||||||
|
Its usage is the following:
|
||||||
|
|
||||||
|
Usage: dummy-recorder.sh <device-name> [output-file] [interval]
|
||||||
|
|
||||||
|
For example, to record information from the device 'myups' every 10 seconds:
|
||||||
|
|
||||||
|
tools/device-recorder.sh myups@localhost myups.seq 10
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
NUT core development and maintenance
|
||||||
|
====================================
|
||||||
|
|
||||||
|
This section is intended to people who want to develop new core features,
|
||||||
|
or to do some maintenance.
|
||||||
|
|
||||||
|
|
||||||
|
include::macros.txt[]
|
||||||
|
|
||||||
|
|
||||||
|
[[roadmap]]
|
||||||
|
|
||||||
|
include::../TODO[]
|
||||||
|
|
||||||
|
|
||||||
|
[[nut-names]]
|
||||||
|
Appendix A: NUT command and variable naming scheme
|
||||||
|
==================================================
|
||||||
|
|
||||||
|
include::nut-names.txt[]
|
|
@ -1,16 +1,14 @@
|
||||||
Desc: Information for developers
|
Information for developers
|
||||||
File: developers.txt
|
==========================
|
||||||
Date: 18 February 2004
|
|
||||||
Auth: Russell Kroll <rkroll@exploits.org>
|
|
||||||
|
|
||||||
This document is intended to explain some of the more useful things
|
This document is intended to explain some of the more useful things
|
||||||
within the tree and provide a standard for working on the code.
|
within the tree and provide a standard for working on the code.
|
||||||
|
|
||||||
General stuff - common subdirectory
|
General stuff - common subdirectory
|
||||||
===================================
|
-----------------------------------
|
||||||
|
|
||||||
String handling
|
String handling
|
||||||
---------------
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Use snprintf. It's even provided with a compatibility module if the
|
Use snprintf. It's even provided with a compatibility module if the
|
||||||
target host doesn't have it natively.
|
target host doesn't have it natively.
|
||||||
|
@ -24,7 +22,7 @@ that allows you to append to char * with a format string and all the usual
|
||||||
string length checking of snprintf.
|
string length checking of snprintf.
|
||||||
|
|
||||||
Error reporting
|
Error reporting
|
||||||
---------------
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Don't call syslog() directly. Use upslog_with_errno() and upslogx().
|
Don't call syslog() directly. Use upslog_with_errno() and upslogx().
|
||||||
They may write to the syslog, stderr, or both as appropriate. This
|
They may write to the syslog, stderr, or both as appropriate. This
|
||||||
|
@ -38,21 +36,21 @@ fatal_with_errno and fatalx work the same way, but they
|
||||||
exit(EXIT_FAILURE) afterwards. Don't call exit() directly.
|
exit(EXIT_FAILURE) afterwards. Don't call exit() directly.
|
||||||
|
|
||||||
Debugging information
|
Debugging information
|
||||||
---------------------
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
upsdebug_with_errno(), upsdebugx() and upsdebug_hex() use the
|
upsdebug_with_errno(), upsdebugx() and upsdebug_hex() use the
|
||||||
global nut_debug_level so you don't have to mess around with
|
global nut_debug_level so you don't have to mess around with
|
||||||
printfs yourself. Use them.
|
printfs yourself. Use them.
|
||||||
|
|
||||||
Memory allocation
|
Memory allocation
|
||||||
-----------------
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
xmalloc, xcalloc, xrealloc and xstrdup all check the results of the base
|
xmalloc, xcalloc, xrealloc and xstrdup all check the results of the base
|
||||||
calls before continuing, so you don't have to. Don't use the raw calls
|
calls before continuing, so you don't have to. Don't use the raw calls
|
||||||
directly.
|
directly.
|
||||||
|
|
||||||
Config file parsing
|
Config file parsing
|
||||||
-------------------
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The configuration parser, called parseconf, is now up to its fourth
|
The configuration parser, called parseconf, is now up to its fourth
|
||||||
major version. It has multiple entry points, and can handle many
|
major version. It has multiple entry points, and can handle many
|
||||||
|
@ -67,7 +65,7 @@ Escaping special characters and quoting multiple-word elements is all
|
||||||
handled by the state machine. Using the same code for all config files
|
handled by the state machine. Using the same code for all config files
|
||||||
avoids code duplication.
|
avoids code duplication.
|
||||||
|
|
||||||
Note: this does not apply to drivers. Driver authors should use the
|
NOTE: this does not apply to drivers. Driver authors should use the
|
||||||
upsdrv_makevartable() scheme to pick up values from ups.conf. Drivers
|
upsdrv_makevartable() scheme to pick up values from ups.conf. Drivers
|
||||||
should not have their own config files.
|
should not have their own config files.
|
||||||
|
|
||||||
|
@ -78,56 +76,63 @@ under normal circumstances. This technique might be used to add more
|
||||||
hardware support to a driver without recompiling.
|
hardware support to a driver without recompiling.
|
||||||
|
|
||||||
<time.h> vs. <sys/time.h>
|
<time.h> vs. <sys/time.h>
|
||||||
-------------------------
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
This is already handled by autoconf, so just include "timehead.h" and you
|
This is already handled by autoconf, so just include "timehead.h" and you
|
||||||
will get the right headers on every system.
|
will get the right headers on every system.
|
||||||
|
|
||||||
UPS drivers - main.c
|
Device drivers - main.c
|
||||||
====================
|
-----------------------
|
||||||
|
|
||||||
The UPS drivers use main.c as their core. The only exception is
|
The device drivers use main.c as their core. The only exceptions are the
|
||||||
dummycons, which only looks like a driver by using the same dstate
|
HAL-based drivers, which use the same dstate function calls while integrating
|
||||||
function calls.
|
with the DBUS event loop.
|
||||||
|
|
||||||
To write a new driver, you create a file with a series of support
|
To write a new driver, you create a file with a series of support
|
||||||
functions that will be called by main. These all have names that start
|
functions that will be called by main. These all have names that start
|
||||||
with "upsdrv_", and they will be called at different times by main
|
with `upsdrv_`, and they will be called at different times by main
|
||||||
depending on what needs to happen.
|
depending on what needs to happen.
|
||||||
|
|
||||||
See new-drivers.txt for information on writing drivers, and also refer
|
See the <<new-drivers,driver documentation>> for information on writing
|
||||||
to the skeletal driver in skel.c.
|
drivers, and also refer to the skeletal driver in skel.c.
|
||||||
|
|
||||||
Portability
|
Portability
|
||||||
===========
|
-----------
|
||||||
|
|
||||||
Avoid things that will break on other systems. All the world is not an
|
Avoid things that will break on other systems. All the world is not an
|
||||||
x86 Linux box.
|
x86 Linux box.
|
||||||
|
|
||||||
There are still older systems out there that don't do C++ style comments.
|
There are still older systems out there that don't do C++ style comments.
|
||||||
That means you have to comment /* like this */, and // this is right out.
|
|
||||||
|
--------------------------------------
|
||||||
|
/* Comments look like this. */
|
||||||
|
// Not like this.
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
Newer versions of gcc allow you to declare a variable inside a function
|
Newer versions of gcc allow you to declare a variable inside a function
|
||||||
somewhat like the way C++ operates, like this:
|
somewhat like the way C++ operates, like this:
|
||||||
|
|
||||||
function do_stuff(void)
|
--------------------------------------------------------------------------------
|
||||||
{
|
function do_stuff(void)
|
||||||
check_something();
|
{
|
||||||
|
check_something();
|
||||||
|
|
||||||
int a;
|
int a;
|
||||||
|
|
||||||
a = do_something_else();
|
a = do_something_else();
|
||||||
}
|
}
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
While this will compile and run on these newer versions, it will fail
|
While this will compile and run on these newer versions, it will fail
|
||||||
miserably for anyone on an older system. That means you must not use
|
miserably for anyone on an older system. That means you must not use
|
||||||
it. gcc only warns about this with -pedantic.
|
it. gcc only warns about this with -pedantic.
|
||||||
|
|
||||||
Coding style
|
Coding style
|
||||||
============
|
------------
|
||||||
|
|
||||||
This is how I do things.
|
This is how we do things:
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
int open_subspace(char *ship, int privacy)
|
int open_subspace(char *ship, int privacy)
|
||||||
{
|
{
|
||||||
if (!privacy)
|
if (!privacy)
|
||||||
|
@ -138,8 +143,7 @@ int open_subspace(char *ship, int privacy)
|
||||||
|
|
||||||
return secure_channel(ship);
|
return secure_channel(ship);
|
||||||
}
|
}
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
(The example that used to be in this file wasn't particularly clear)
|
|
||||||
|
|
||||||
The basic idea is that I try to group things into functions, and then
|
The basic idea is that I try to group things into functions, and then
|
||||||
find ways to drop out of them when we can't go any further. There's
|
find ways to drop out of them when we can't go any further. There's
|
||||||
|
@ -159,7 +163,7 @@ easier to read, and it enables tools (such as indent and emacs) to
|
||||||
display the source code correctly.
|
display the source code correctly.
|
||||||
|
|
||||||
Indenting with tabs vs. spaces
|
Indenting with tabs vs. spaces
|
||||||
------------------------------
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Another thing to notice is that the indenting happens with tabs instead
|
Another thing to notice is that the indenting happens with tabs instead
|
||||||
of spaces. This lets everyone have their personal tab-width setting
|
of spaces. This lets everyone have their personal tab-width setting
|
||||||
|
@ -180,7 +184,7 @@ kernel - Documentation/CodingStyle. He's done a far better job of
|
||||||
explaining this.
|
explaining this.
|
||||||
|
|
||||||
Line breaks
|
Line breaks
|
||||||
-----------
|
~~~~~~~~~~~
|
||||||
|
|
||||||
It is better to have lines that are longer than 80 characters than to
|
It is better to have lines that are longer than 80 characters than to
|
||||||
wrap lines in random places. This makes it easier to work with tools
|
wrap lines in random places. This makes it easier to work with tools
|
||||||
|
@ -193,13 +197,17 @@ long when there is a better alternative (see the note on
|
||||||
pretentiousVariableNamingSchemes above). Certainly there should not
|
pretentiousVariableNamingSchemes above). Certainly there should not
|
||||||
be more than one statement per line. Please do not use
|
be more than one statement per line. Please do not use
|
||||||
|
|
||||||
if (condition) break;
|
--------------------------------------------------------------------------------
|
||||||
|
if (condition) break;
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
but use the following:
|
but use the following:
|
||||||
|
|
||||||
if (condition) {
|
--------------------------------------------------------------------------------
|
||||||
break;
|
if (condition) {
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Miscellaneous coding style tools
|
Miscellaneous coding style tools
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
@ -207,12 +215,12 @@ Miscellaneous coding style tools
|
||||||
You can go a long way towards converting your source code to the NUT
|
You can go a long way towards converting your source code to the NUT
|
||||||
coding style by piping it through the following command:
|
coding style by piping it through the following command:
|
||||||
|
|
||||||
indent -kr -i8 -T FILE -l1000 -nhnl
|
indent -kr -i8 -T FILE -l1000 -nhnl
|
||||||
|
|
||||||
This next command does a reasonable job of converting most C++ style
|
This next command does a reasonable job of converting most C++ style
|
||||||
comments (but not URLs and DOCTYPE strings):
|
comments (but not URLs and DOCTYPE strings):
|
||||||
|
|
||||||
sed 's#\(^\|[ \t]\)//[ \t]*\(.*\)[ \t]*#/* \2 */#'
|
sed 's#\(^\|[ \t]\)//[ \t]*\(.*\)[ \t]*#/* \2 */#'
|
||||||
|
|
||||||
Emacs users can adjust how tabs are displayed. For example, it is
|
Emacs users can adjust how tabs are displayed. For example, it is
|
||||||
possible to set a tab stop to be 3 spaces, rather than the usual 8.
|
possible to set a tab stop to be 3 spaces, rather than the usual 8.
|
||||||
|
@ -222,25 +230,27 @@ rendered on screen). It is even possible to set this on a
|
||||||
per-directory basis, by putting something like this into your .emacs
|
per-directory basis, by putting something like this into your .emacs
|
||||||
file:
|
file:
|
||||||
|
|
||||||
;; NUT style
|
--------------------------------------------------------------------------------
|
||||||
|
;; NUT style
|
||||||
|
|
||||||
(defun nut-c-mode ()
|
(defun nut-c-mode ()
|
||||||
"C mode with adjusted defaults for use with the NUT sources."
|
"C mode with adjusted defaults for use with the NUT sources."
|
||||||
(interactive)
|
(interactive)
|
||||||
(c-mode)
|
(c-mode)
|
||||||
(c-set-style "K&R")
|
(c-set-style "K&R")
|
||||||
(setq c-basic-offset 3) ;; 3 spaces C-indentation
|
(setq c-basic-offset 3) ;; 3 spaces C-indentation
|
||||||
(setq tab-width 3)) ;; 3 spaces per tab
|
(setq tab-width 3)) ;; 3 spaces per tab
|
||||||
|
|
||||||
;; apply NUT style to all C source files in all subdirectories of nut/
|
;; apply NUT style to all C source files in all subdirectories of nut/
|
||||||
|
|
||||||
(setq auto-mode-alist (cons '(".*/nut/.*\\.[ch]$". nut-c-mode)
|
(setq auto-mode-alist (cons '(".*/nut/.*\\.[ch]$". nut-c-mode)
|
||||||
auto-mode-alist))
|
auto-mode-alist))
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Finishing touches
|
Finishing touches
|
||||||
-----------------
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
I like code that uses const and static liberally. If you don't need to
|
We like code that uses const and static liberally. If you don't need to
|
||||||
expose a function or global variable to the outside world, static is
|
expose a function or global variable to the outside world, static is
|
||||||
your friend. If nobody should edit the contents of some buffer that's
|
your friend. If nobody should edit the contents of some buffer that's
|
||||||
behind a pointer, const keeps them honest.
|
behind a pointer, const keeps them honest.
|
||||||
|
@ -250,25 +260,23 @@ find implementation flaws. Functions that attempt to modify a constant
|
||||||
or access something outside their scope will throw a warning or even
|
or access something outside their scope will throw a warning or even
|
||||||
fail to compile in some cases. This is what we want.
|
fail to compile in some cases. This is what we want.
|
||||||
|
|
||||||
Spaghetti
|
|
||||||
---------
|
|
||||||
|
|
||||||
If you use a goto, expect me to drop it when my head stops spinning.
|
Spaghetti
|
||||||
It gives me flashbacks to the BASIC code I wrote on the 8 bit systems of
|
~~~~~~~~~
|
||||||
the 80s. I've tried to clean up my act, and you should make the effort
|
|
||||||
|
If you use a goto, expect us to drop it when our head stops spinning.
|
||||||
|
It gives us flashbacks to the very old code we wrote.
|
||||||
|
We've tried to clean up our act, and you should make the effort
|
||||||
as well.
|
as well.
|
||||||
|
|
||||||
I'm not making a blanket statement about gotos, since everything
|
We're not making a blanket statement about gotos, since everything
|
||||||
probably has at least one good use. There are a few cases where a goto
|
probably has at least one good use. There are a few cases where a goto
|
||||||
is more efficient than any other approach, but you probably won't
|
is more efficient than any other approach, but you probably won't
|
||||||
encounter them in this software.
|
encounter them very often in this software.
|
||||||
|
|
||||||
Hint: there *was* a good use of a goto in upsd until the 1.3 series. At
|
|
||||||
this point we are back to zero gotos since that code was replaced by
|
|
||||||
another technique that doesn't need it.
|
|
||||||
|
|
||||||
Legacy code
|
Legacy code
|
||||||
-----------
|
~~~~~~~~~~~
|
||||||
|
|
||||||
There are parts of the source tree that do not yet conform to these
|
There are parts of the source tree that do not yet conform to these
|
||||||
specs. Part of this is due to the fact that the coding style has been
|
specs. Part of this is due to the fact that the coding style has been
|
||||||
|
@ -278,74 +286,94 @@ since then. Don't worry - it'll get cleaned up the next time something
|
||||||
in the vicinity gets a visit.
|
in the vicinity gets a visit.
|
||||||
|
|
||||||
Memory leak checking
|
Memory leak checking
|
||||||
--------------------
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
I can't say enough good things about valgrind. If you do anything with
|
We can't say enough good things about valgrind. If you do anything with
|
||||||
dynamic memory in your code, you need to use this. Just compile with -g
|
dynamic memory in your code, you need to use this. Just compile with -g
|
||||||
and start the program inside valgrind. Run it through the suspected
|
and start the program inside valgrind. Run it through the suspected
|
||||||
area and then exit cleanly. valgrind will tell you if you've done
|
area and then exit cleanly. valgrind will tell you if you've done
|
||||||
anything dodgy like freeing regions twice, reading uninitialized memory,
|
anything dodgy like freeing regions twice, reading uninitialized memory,
|
||||||
or if you've leaked memory anywhere.
|
or if you've leaked memory anywhere.
|
||||||
|
|
||||||
http://valgrind.kde.org/
|
For more information, refer to the link:http://valgrind.kde.org[Valgrind]
|
||||||
|
project.
|
||||||
|
|
||||||
Conclusion
|
Conclusion
|
||||||
----------
|
~~~~~~~~~~
|
||||||
|
|
||||||
The summary: please be kind to my eyes. There's a lot of stuff in here.
|
The summary: please be kind to our eyes. There's a lot of stuff in here,
|
||||||
|
and many people have put a lot of time and energy to improve it.
|
||||||
|
|
||||||
Submitting patches
|
Submitting patches
|
||||||
==================
|
------------------
|
||||||
|
|
||||||
Patches that arrive in unified format (diff -u) as plain text with no
|
Patches that arrive in unified format (diff -u) as plain text attachments with
|
||||||
HTML, no attachments and a brief summary at the top are the easiest to
|
no HTML and a brief summary at the top are the easiest to handle.
|
||||||
handle. They show the context, explain what's going on, and get saved as
|
|
||||||
one message. Everything stays together until it's time to merge.
|
|
||||||
|
|
||||||
Patches that arrive as attachments have to be moved around as separate
|
If a patch is sent to the nut-upsdev mailing list, it stands a better chance of
|
||||||
files - the body of the message is one, and the patch is in another.
|
being seen immediately. However, it is likely to be dropped if any issues
|
||||||
This is not my preferred mode of operation.
|
cannot be resolved quickly. If your code might not work for others, or if it is
|
||||||
|
a large change, your best bet is to submit a
|
||||||
|
link:https://alioth.debian.org/tracker/?atid=411544&group_id=30602&func=browse[ticket on Alioth].
|
||||||
|
|
||||||
When sending patches to the lists, be sure to add me as an explicit
|
This allows us to track the patches over a longer period of time, and it is
|
||||||
recipient to make sure it is considered for merging. A patch which only
|
less likely that a patch will fall through the cracks. Posting a reminder to
|
||||||
goes to a list is generally treated as a RFC and is relatively low
|
the developers (via the nut-upsdev list) about a patch on the tracker is fair
|
||||||
priority.
|
game.
|
||||||
|
|
||||||
If your mailer is brain dead and rewrites tabs into spaces, wraps your
|
|
||||||
patch body, or anything else like that, just attach the patch. I'd
|
|
||||||
rather deal with an attachment instead of a patch that has tab damage,
|
|
||||||
rewrapped lines, or worse.
|
|
||||||
|
|
||||||
Patch cohesion
|
Patch cohesion
|
||||||
==============
|
--------------
|
||||||
|
|
||||||
Patches should have some kind of unifying element. One patch set is one
|
Patches should have some kind of unifying element. One patch set is one
|
||||||
message, and it should all touch similar things. If you have to edit 6
|
message, and it should all touch similar things. If you have to edit 6
|
||||||
files to add support for neutrino detection in UPS hardware, that's
|
files to add support for neutrino detection in UPS hardware, that's
|
||||||
fine.
|
fine.
|
||||||
|
|
||||||
However, sending one huge patch that does massive separate changes
|
However, sending one huge patch that does massive separate changes all over
|
||||||
all over the tree is not recommended. That kind of patch has to be
|
the tree is not recommended. That kind of patch has to be split up and
|
||||||
split up and evaluated separately, assuming I care enough to do that
|
evaluated separately, assuming the core developers care enough to do that
|
||||||
instead of just dropping it.
|
instead of just dropping it.
|
||||||
|
|
||||||
If you have to make big changes in lots of places, send multiple
|
If you have to make big changes in lots of places, send multiple
|
||||||
patches - one per item.
|
patches - one per item.
|
||||||
|
|
||||||
Man pages
|
The completion touch: manual pages and device entry in HCL
|
||||||
=========
|
----------------------------------------------------------
|
||||||
|
|
||||||
If you change something that involves an argument to a program or
|
If you change something that involves an argument to a program or
|
||||||
configuration file parsing, the man page is probably now out of date.
|
configuration file parsing, the man page is probably now out of date.
|
||||||
If you don't update it, I have to, and I have enough to do as it is.
|
If you don't update it, we have to, and we have enough to do as it is.
|
||||||
|
|
||||||
If you write a new driver, send in the man page when you send me the
|
If you write a new driver, send in the man page when you send us the
|
||||||
source code for your driver. Otherwise, I will be forced to write a
|
source code for your driver. Otherwise, we will be forced to write a
|
||||||
skeletal man page that will probably miss many of the finer points of
|
skeletal man page that will probably miss many of the finer points of
|
||||||
the driver and hardware.
|
the driver and hardware.
|
||||||
|
|
||||||
|
The same remark goes for device entries: if you add support for new models,
|
||||||
|
remember to also complete the hardware compatibility list, present
|
||||||
|
in data/driver.list.in. This will be used to generate both textual, static
|
||||||
|
HTML and dynamic searchable HTML for the website.
|
||||||
|
|
||||||
|
Source code management
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
We currently use a Subversion (SVN) repository hosted at Alioth to track
|
||||||
|
changes to the NUT source code. To obtain permission to commit to the SVN
|
||||||
|
repository, you must be prepared to spend a fair amount of time contributing to
|
||||||
|
the NUT codebase. For occasional contributions over time, you may wish to
|
||||||
|
investigate one of the <<_distributed_scm_systems,distributed SCM tools>>
|
||||||
|
listed below.
|
||||||
|
|
||||||
|
Anonymous SVN checkouts are possible:
|
||||||
|
|
||||||
|
svn co svn://svn.debian.org/nut/trunk nut-svn-readonly
|
||||||
|
|
||||||
|
If you change a file in the SVN working copy, you can use `svn diff` to
|
||||||
|
generate a patch to send to the nut-upsdev mailing list.
|
||||||
|
|
||||||
Repository etiquette and quality assurance
|
Repository etiquette and quality assurance
|
||||||
==========================================
|
------------------------------------------
|
||||||
|
|
||||||
Please keep the SVN trunk in working condition at all times. The trunk
|
Please keep the SVN trunk in working condition at all times. The trunk
|
||||||
may be used to generate daily tarballs, and should not contain broken
|
may be used to generate daily tarballs, and should not contain broken
|
||||||
|
@ -353,22 +381,103 @@ code if possible. If you need to commit incremental changes that leave
|
||||||
the system in a broken state, please do so in a separate branch and
|
the system in a broken state, please do so in a separate branch and
|
||||||
merge the changes back to the trunk once they are complete.
|
merge the changes back to the trunk once they are complete.
|
||||||
|
|
||||||
Before committing, please remember to:
|
Before committing, please remember to run "make distcheck-light". This checks
|
||||||
|
that the Makefiles are not broken, that all the relevant files are distributed,
|
||||||
|
and that there are no compilation or installation errors.
|
||||||
|
|
||||||
* update the ChangeLog, if appropriate. Dates are listed in UTC
|
Running "make distcheck-light" is especially important if you have added or
|
||||||
("date --utc").
|
removed files, or updated configure.in or some Makefile.am. Remember: simply
|
||||||
|
adding a file to SVN does not mean it will be distributed. To distribute a
|
||||||
* run "make distcheck-light". This checks that the Makefiles are not
|
file, you must update the corresponding Makefile.am.
|
||||||
broken, that all the relevant files are distributed, and that there
|
|
||||||
are no compilation or installation errors.
|
|
||||||
|
|
||||||
Running "make distcheck-light" is especially important if you have
|
|
||||||
added or removed files, or updated configure.in or some Makefile.am.
|
|
||||||
Remember: simply adding a file to SVN does not mean it will be
|
|
||||||
distributed. To distribute a file, you must update the corresponding
|
|
||||||
Makefile.am.
|
|
||||||
|
|
||||||
There is also "make distcheck", which runs an even stricter set of
|
There is also "make distcheck", which runs an even stricter set of
|
||||||
tests, but will not work unless you have all the optional libraries
|
tests, but will not work unless you have all the optional libraries
|
||||||
and features installed.
|
and features installed.
|
||||||
|
|
||||||
|
Distributed SCM systems
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
Git and Mercurial (Hg) are two popular distributed SCM tools which provide a
|
||||||
|
bridge to a SVN repository. This makes it possible for a new developer to stay
|
||||||
|
synchronized with the latest changes to NUT, while keeping a local version
|
||||||
|
history of their changes before they are merged by the core NUT developers.
|
||||||
|
|
||||||
|
A complete introduction to either Git or Mercurial is beyond the scope of this
|
||||||
|
document, but many others have written excellent tutorials on both the DSCM
|
||||||
|
tools, and their SVN interfaces.
|
||||||
|
|
||||||
|
Git and SVN
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
The `git svn` tool synchronizes a Git repository with a
|
||||||
|
link:http://www.kernel.org/pub/software/scm/git/docs/git-svn.html[SVN repository].
|
||||||
|
|
||||||
|
In many cases, NUT developers will not need access to the entire repository
|
||||||
|
history - a snapshot starting at the most recent revision will work nicely:
|
||||||
|
|
||||||
|
git svn clone --revision HEAD svn://svn.debian.org/nut/trunk nut-git
|
||||||
|
|
||||||
|
From the resulting nut-git directory, you may use all of the Git commands to
|
||||||
|
record your changes, and even create new branches for working on different
|
||||||
|
aspects of the code.
|
||||||
|
|
||||||
|
Git offers a little more flexibility than the `svn update` command. You may
|
||||||
|
fetch other developers' changes from SVN into your repository, but hold off on
|
||||||
|
actually combining them with your branch until you have compared the two
|
||||||
|
branches (for instance, with `gitk --all`).
|
||||||
|
|
||||||
|
To import the new SVN revisions, simply run the following command from any
|
||||||
|
directory under your Git checkout (`nut-git` in the example above). Note that
|
||||||
|
this only changes the history stored in your repository - it does not touch
|
||||||
|
your checked-out files.
|
||||||
|
|
||||||
|
git svn fetch
|
||||||
|
|
||||||
|
Initially, the Git `master` branch tracks the SVN `trunk`. The `git svn`
|
||||||
|
command updates the `remotes/trunk` reference every time you run `git svn
|
||||||
|
fetch`, but it does not adjust the `master` branch automatically. To update
|
||||||
|
your master branch with new SVN revisions, you can run the following commands:
|
||||||
|
|
||||||
|
git checkout master
|
||||||
|
git svn fetch # (optional; this gets commits other than on your current branch)
|
||||||
|
git svn rebase
|
||||||
|
|
||||||
|
You may create as many branches as you like in your local Git repository. When
|
||||||
|
using `git svn`, the preferred way to combine your changes with SVN changes is
|
||||||
|
to use `git rebase` on your local branch. This re-applies your branch's changes
|
||||||
|
to the new SVN changes, much as though your branch were a series of patches.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
git checkout master
|
||||||
|
git branch my-new-feature
|
||||||
|
git checkout my-new-feature
|
||||||
|
|
||||||
|
# Hack away
|
||||||
|
|
||||||
|
git add changed-file.c
|
||||||
|
git commit
|
||||||
|
|
||||||
|
# Someone committed something to SVN. Fetch it.
|
||||||
|
|
||||||
|
git svn fetch
|
||||||
|
git rebase remotes/trunk
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
You are encouraged to use `git rebase -i` on your private Git branches to
|
||||||
|
separate your changes into <<_patch_cohesion,logical changes>>.
|
||||||
|
|
||||||
|
From there, you can generate patches for the Tracker, or the nut-upsdev list.
|
||||||
|
|
||||||
|
If you are new to Git, but are familiar with SVN, the
|
||||||
|
link:http://git-scm.com/course/svn.html[following link] may be of use.
|
||||||
|
|
||||||
|
|
||||||
|
Mercurial and SVN
|
||||||
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Synchronizing a Mercurial repository against the NUT SVN repository should be
|
||||||
|
similar in spirit to the Git method discussed above.
|
||||||
|
link:http://mercurial.selenic.com/wiki/WorkingWithSubversion[This wiki page]
|
||||||
|
discusses your options.
|
||||||
|
|
||||||
|
We would welcome any feedback about this process on the nut-upsdev mailing list.
|
||||||
|
|
10
docs/docinfo.xml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<revhistory>
|
||||||
|
<revision>
|
||||||
|
<revnumber>2.6.0</revnumber>
|
||||||
|
<date>2011-01-14</date>
|
||||||
|
<authorinitials></authorinitials>
|
||||||
|
<revremark>
|
||||||
|
First release of AsciiDoc documentation for Network UPS Tools (NUT).
|
||||||
|
</revremark>
|
||||||
|
</revision>
|
||||||
|
</revhistory>
|
70
docs/documentation.txt
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
ifdef::website[]
|
||||||
|
Documentation
|
||||||
|
=============
|
||||||
|
endif::website[]
|
||||||
|
|
||||||
|
User Documentation
|
||||||
|
------------------
|
||||||
|
|
||||||
|
ifdef::website[]
|
||||||
|
- FAQ - Frequently Asked Questions (link:docs/FAQ.html[online]) (link:docs/FAQ.pdf[PDF])
|
||||||
|
- NUT User Manual (link:docs/user-manual.chunked/index.html[online]) (link:docs/user-manual.pdf[PDF])
|
||||||
|
- Cables information (link:cables.html[online]) (link:cables.pdf[PDF])
|
||||||
|
- link:docs/man/index.html#User_man[User manual pages]
|
||||||
|
endif::website[]
|
||||||
|
ifndef::website[]
|
||||||
|
- link:../FAQ.html[FAQ - Frequently Asked Questions]
|
||||||
|
- linkdoc:user-manual[NUT user manual]
|
||||||
|
- <<Cables_information,Cables information>>
|
||||||
|
- link:../man/index.html#User_man[User manual pages]
|
||||||
|
endif::website[]
|
||||||
|
|
||||||
|
Developer Documentation
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
ifdef::website[]
|
||||||
|
- NUT Developer Guide (link:docs/developer-guide.chunked/index.html[online]) (link:docs/developer-guide.pdf[PDF])
|
||||||
|
- NUT Packager Guide (link:docs/packager-guide.chunked/index.html[online]) (link:docs/packager-guide.pdf[PDF])
|
||||||
|
- link:ups-protocols.html[UPS protocols library]
|
||||||
|
- link:docs/man/index.html#Developer_man[Developer manual pages]
|
||||||
|
- link:nut-qa.html[NUT Quality Assurance]
|
||||||
|
endif::website[]
|
||||||
|
ifndef::website[]
|
||||||
|
- linkdoc:developer-guide[NUT Developer Guide]
|
||||||
|
- linkdoc:packager-guide[NUT Packager Guide]
|
||||||
|
- link:ups-protocols.html[UPS protocols library]
|
||||||
|
- link:../man/index.html#Developer_man[Developer manual pages]
|
||||||
|
- link:nut-qa.html[NUT Quality Assurance]
|
||||||
|
endif::website[]
|
||||||
|
|
||||||
|
Offsite Links
|
||||||
|
-------------
|
||||||
|
|
||||||
|
[[general_powerdev_info]]
|
||||||
|
These are general information about UPS and PDU.
|
||||||
|
|
||||||
|
- link:http://tldp.org/HOWTO/UPS-HOWTO/[UPS HOWTO] (The Linux Documentation Project)
|
||||||
|
- link:http://en.wikipedia.org/wiki/Uninterruptible_power_supply[UPS on Wikipedia]
|
||||||
|
- link:http://en.wikipedia.org/wiki/Power_distribution_unit[PDU on Wikipedia]
|
||||||
|
- link:http://www.pcguide.com/ref/power/ext/ups/over.htm[UPS on The PC Guide]
|
||||||
|
|
||||||
|
These are writeups by users of the software.
|
||||||
|
|
||||||
|
- link:http://www.dimat.unina2.it/LCS/MonitoraggioUpsNutUbuntu10-eng.htm[Deploying NUT on an Ubuntu 10.04 cluster] '(Stefano Angelone)'
|
||||||
|
- link:http://blog.shadypixel.com/monitoring-a-ups-with-nut-on-debian-or-ubuntu-linux[Monitoring a UPS with nut on Debian or Ubuntu Linux] '(Avery Fay)'
|
||||||
|
- link:http://linux.developpez.com/cours/upsusb/[Installation et gestion d'un UPS USB en réseau sous linux] '(Olivier Van Hoof, french)'
|
||||||
|
- link:http://boxster.ghz.cc/projects/nut/wiki/NutOnMacOSX[Network UPS Tools (NUT) on Mac OS X (10.4.10)] '(Andy Poush)'
|
||||||
|
- link:http://www.llondel.org/ups.shtml[Interfacing a Contact-Closure UPS to Mac OS X and Linux] '(David Hough)'
|
||||||
|
- link:http://fedoranews.org/contributors/kazutoshi_morioka/nut/[How to use UPS with nut on RedHat / Fedora Core] '(Kazutoshi Morioka)'
|
||||||
|
- link:http://people.freebsd.org/~thierry/nut_FreeBSD_HowTo.txt[FreeBSD installation procedure] '(Thierry Thomas, from FreeBSD)'
|
||||||
|
- link:http://www.usebox.net/jjm/ups-obsd/[Gestionando un SAI desde OpenBSD con NUT] '(Juan J. Martinez, spanish)'
|
||||||
|
- link:http://forums.gentoo.org/viewtopic-p-2663684.html[HOWTO: MGE Ellipse 300 on gentoo] '(nielchiano)'
|
||||||
|
- link:http://deschis.blogspot.com/2006/07/cum-se-configureaz-un-ups-apollo-seria.html[Cum se configurează un UPS Apollo seria 1000F pe Linux] '(deschis, Romanian)'
|
||||||
|
- link:http://buffalo.nas-central.org/wiki/Install_a_UPS_%28nut%29[Install a UPS (nut) on a Buffalo NAS] '(various authors)'
|
||||||
|
- link:http://blog.pointbre.com/2903/nutnetwork-ups-tool-korean-guidebook.html[NUT Korean GuideBook] '(PointBre)'
|
||||||
|
|
||||||
|
News articles and Press releases
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
- link:http://www.crn.com/white-box/199000818?pgno=1[Linux UPS Without Tears] '(A. Lizard)'
|
||||||
|
- link:http://networking.earthweb.com/netsysm/article.php/10954_3295841_1[Graceful UPS shutdowns on Linux] '(Carla Schroder)'
|
117
docs/download.txt
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
Download information
|
||||||
|
====================
|
||||||
|
|
||||||
|
This section presents the different methods to download NUT.
|
||||||
|
|
||||||
|
Source code
|
||||||
|
-----------
|
||||||
|
|
||||||
|
[NOTE]
|
||||||
|
================================================================================
|
||||||
|
You should always use PGP/GPG to verify the signatures before using any source code.
|
||||||
|
|
||||||
|
You can use the
|
||||||
|
ifdef::website[]
|
||||||
|
link:docs/user-manual.chunked/ar01s09.html#verifySourceSig[following procedure]
|
||||||
|
endif::website[]
|
||||||
|
ifndef::website[]
|
||||||
|
- Else, you can read the <<verifySourceSig,following procedure>>.
|
||||||
|
endif::website[]
|
||||||
|
to do so.
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
Stable tree: 2.6
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
link:http://www.networkupstools.org/source/2.6/nut-2.6.0.tar.gz[nut-2.6.0.tar.gz]
|
||||||
|
link:http://www.networkupstools.org/source/2.6/nut-2.6.0.tar.gz.sig[signature]
|
||||||
|
link:http://www.networkupstools.org/source/2.6/new-2.6.0.txt[release notes]
|
||||||
|
link:http://www.networkupstools.org/source/2.6/ChangeLog[ChangeLog]
|
||||||
|
|
||||||
|
You can also browse the link:http://www.networkupstools.org/source/2.6/[stable source directory].
|
||||||
|
|
||||||
|
|
||||||
|
Testing tree: 2.6.x-pre
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
There is currently no testing release.
|
||||||
|
|
||||||
|
|
||||||
|
Development tree: 2.7
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Code repository
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The development tree is available through a Subversion repository hosted on the
|
||||||
|
link:http://alioth.debian.org/[Debian Alioth server].
|
||||||
|
|
||||||
|
To retrieve the current development tree, use the following command:
|
||||||
|
|
||||||
|
$ svn co svn://svn.debian.org/nut/trunk
|
||||||
|
|
||||||
|
To generate the build scripts, you must call, from the 'trunk' directory:
|
||||||
|
|
||||||
|
$ ./autogen.sh
|
||||||
|
|
||||||
|
Then refer to the
|
||||||
|
ifdef::website[]
|
||||||
|
link:docs/user-manual.chunked/index.html[NUT user manual]
|
||||||
|
endif::website[]
|
||||||
|
ifndef::website[]
|
||||||
|
linkdoc:user-manual[NUT user manual]
|
||||||
|
endif::website[]
|
||||||
|
for more information.
|
||||||
|
|
||||||
|
NOTE: Users that need the latest developments to support new devices *must*
|
||||||
|
use <<Snapshots,snapshots>>.
|
||||||
|
|
||||||
|
Browse code
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
You can also browse the code with link:http://svn.debian.org/wsvn/nut/trunk/?rev=0&sc=0[WebSvn].
|
||||||
|
|
||||||
|
Or through the link:http://boxster.ghz.cc/projects/nut[Trac mirror],
|
||||||
|
kindly hosted and maintained by Charles Lepple.
|
||||||
|
|
||||||
|
[[Snapshots]]
|
||||||
|
Snapshots
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
The latest Subversion developments are available through link:http://buildbot.networkupstools.org/public/nut/waterfall?branch=trunk&builder=Debian-etch-x86&reload=none[snapshots on the Buildbot].
|
||||||
|
Look for the latest *[tarball]* link on the top of the page.
|
||||||
|
|
||||||
|
Older versions
|
||||||
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
link:http://www.networkupstools.org/source/[Browse source directory]
|
||||||
|
|
||||||
|
|
||||||
|
Binary packages
|
||||||
|
---------------
|
||||||
|
|
||||||
|
NOTE: The only official releases from this project are source code.
|
||||||
|
|
||||||
|
NUT is already available in the following systems:
|
||||||
|
|
||||||
|
- Linux:
|
||||||
|
link:http://aur.archlinux.org/packages.php?ID=5379[Arch Linux],
|
||||||
|
link:http://packages.debian.org/nut[Debian],
|
||||||
|
link:http://packages.gentoo.org/package/sys-power/nut[Gentoo Linux],
|
||||||
|
Mandriva,
|
||||||
|
link:https://admin.fedoraproject.org/pkgdb/acls/name/nut[Red Hat / Fedora],
|
||||||
|
link:http://software.opensuse.org/search[Novell Suse / openSUSE],
|
||||||
|
link:https://forum.openwrt.org/viewtopic.php?id=26269[OpenWrt]
|
||||||
|
link:http://packages.ubuntu.com/nut[Ubuntu].
|
||||||
|
|
||||||
|
- BSD systems:
|
||||||
|
link:http://www.FreeBSD.org/cgi/ports.cgi?query=^nut-&stype=name[FreeBSD],
|
||||||
|
link:ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/sysutils/ups-nut/README.html[NetBSD],
|
||||||
|
link:http://www.openbsd.org/cgi-bin/cvsweb/ports/sysutils/nut/[OpenBSD].
|
||||||
|
|
||||||
|
- Mac OS X:
|
||||||
|
link:http://pdb.finkproject.org/pdb/package.php/nut[Fink],
|
||||||
|
link:http://trac.macports.org/browser/trunk/dports/sysutils/nut/Portfile[MacPorts]
|
||||||
|
|
||||||
|
- Windows (client side only):
|
||||||
|
link:http://csociety.ecn.purdue.edu/~delpha/winnut/[WinNUT]
|
239
docs/features.txt
Normal file
|
@ -0,0 +1,239 @@
|
||||||
|
Features
|
||||||
|
========
|
||||||
|
|
||||||
|
NUT provides many features, and is always improving.
|
||||||
|
Thus this list may lag behind the current code.
|
||||||
|
|
||||||
|
Features frequently appear during the development cycles, so be sure to look at
|
||||||
|
the link:http://www.networkupstools.org/download.html[release notes and change logs]
|
||||||
|
to see the latest additions.
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
*FIXME* statement that NUT is *the* de facto standard on Opensource system.
|
||||||
|
all Linux distributors have standardized the Power Devices support using NUT.
|
||||||
|
More and more appliances manufacturers are bundling NUT...
|
||||||
|
=> add an Appendix NUT Device Integration in the User Manual
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
Multiple manufacturer and device support
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
- Monitors many UPS, PDU and SCD models from more than 100 manufacturers with a
|
||||||
|
unified interface (link:stable-hcl.html[Hardware Compatibility List]).
|
||||||
|
|
||||||
|
- Various communication types are supported with the same common interface:
|
||||||
|
* serial,
|
||||||
|
* USB,
|
||||||
|
* network (SNMP, Eaton / MGE XML/HTTP).
|
||||||
|
|
||||||
|
Multiple architecture support
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
- Cross-platform - different flavors of Unix can be managed together with a
|
||||||
|
common set of tools, even crossing architectures.
|
||||||
|
|
||||||
|
- This software has been reported to run on Linux distributions, the BSDs, Apple's
|
||||||
|
OS X, Solaris, IRIX, HP/UX, Tru64 Unix, and AIX.
|
||||||
|
|
||||||
|
- Windows users may be able to build it directly with Cygwin.
|
||||||
|
There is also a port of the client-side monitoring to Windows called WinNUT.
|
||||||
|
|
||||||
|
- Your system will probably run it too. You just need a good C compiler and
|
||||||
|
possibly some more packages to gain access to the serial ports.
|
||||||
|
Other features, such as USB / SNMP / whatever, will also need extra software
|
||||||
|
installed.
|
||||||
|
|
||||||
|
Layered and modular design with multiple processes
|
||||||
|
--------------------------------------------------
|
||||||
|
|
||||||
|
- Three layers: drivers, server, clients.
|
||||||
|
|
||||||
|
- Drivers run on the same host as the server, and clients communicate with the
|
||||||
|
server over the network.
|
||||||
|
|
||||||
|
- This means clients can monitor any UPS anywhere as long as there is a network
|
||||||
|
path between them.
|
||||||
|
|
||||||
|
WARNING: Be sure to plug your network's physical hardware (switches, hubs,
|
||||||
|
routers, bridges, ...) into the UPS!
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
*FIXME* to be removed?
|
||||||
|
|
||||||
|
- This has also allowed us to create easily the Power Management integration.
|
||||||
|
|
||||||
|
=== Power Management integration ===
|
||||||
|
|
||||||
|
- Thanks to its modular design, NUT can feed data to the FreeDesktop Hardware Abstraction Layer (HAL).[[BR]]
|
||||||
|
This allow a seemless integration of USB UPSs, at a small cost (around 200 Kb), reusing the standard Power Management GUIs and providing to users a full Plug & Play system.
|
||||||
|
|
||||||
|
- The added bonus is that this is the best Power Management existing, surpassing the one that exist on Windows and Mac OS, both in terms of devices supported and of features.
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
Redundancy support - Hot swap/high availability power supplies
|
||||||
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
- upsmon can handle high-end servers which receive power from multiple UPSes
|
||||||
|
simultaneously.
|
||||||
|
|
||||||
|
- upsmon won't initiate a shutdown until the total power situation across all
|
||||||
|
source UPSes becomes critical (on battery and low battery).
|
||||||
|
|
||||||
|
- You can lose a UPS completely as long as you still have at least the minimum
|
||||||
|
number of sources available. The minimum value is configurable.
|
||||||
|
|
||||||
|
Security and access control
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
- Manager functions are granted with per-user granularity. The admin can have
|
||||||
|
full powers, while the admin's helper can only do specific non-destructive tasks
|
||||||
|
such as a battery test.
|
||||||
|
|
||||||
|
- The drivers, server, and monitoring client (upsmon) can all run as separate
|
||||||
|
user IDs if this is desired for privilege separation.
|
||||||
|
|
||||||
|
- Only one tiny part of one program has root powers.
|
||||||
|
upsmon starts as root and forks an unprivileged process which does the actual
|
||||||
|
monitoring over the network.
|
||||||
|
They remain connected over a pipe. When a shutdown is necessary, a single
|
||||||
|
character is sent to the privileged process. It then calls the predefined
|
||||||
|
shutdown command. In any other case, the privileged process exits.
|
||||||
|
This was inspired by the auth mechanism in Solar Designer's excellent popa3d.
|
||||||
|
|
||||||
|
- The drivers and network server may be run in a chroot jail for further
|
||||||
|
security benefits. This is supported directly since version 1.4 and beyond with
|
||||||
|
the 'chroot=' configuration directive.
|
||||||
|
|
||||||
|
- IP-based access control relies on the local firewall and
|
||||||
|
link:http://en.wikipedia.org/wiki/TCP_Wrapper[TCP Wrapper].
|
||||||
|
|
||||||
|
- SSL is available as a build option ("--with-ssl").
|
||||||
|
It encrypts sessions with upsd and can also be used to authenticate servers.
|
||||||
|
|
||||||
|
Web-based monitoring
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
- Comes stock with CGI-based web interface tools for UPS monitoring and
|
||||||
|
management, including graphical status displays.
|
||||||
|
|
||||||
|
- Custom status web pages may be generated with the CGI programs, since they use
|
||||||
|
templates to create the pages. This allows you to have status pages which fit
|
||||||
|
the look and feel of the rest of your site.
|
||||||
|
|
||||||
|
Free software
|
||||||
|
-------------
|
||||||
|
|
||||||
|
- That's free beer and free speech. Licensed under the GNU General Public
|
||||||
|
License version 2 or later.
|
||||||
|
|
||||||
|
- Know your systems - all source code is available for inspection, so there are
|
||||||
|
no mysteries or secrets in your critical monitoring tools.
|
||||||
|
|
||||||
|
UPS management and control
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
- Writable variables may be edited on higher end equipment for local customizations
|
||||||
|
|
||||||
|
- Status monitoring can generate notifications (email/pager/SMS/...) on alert conditions
|
||||||
|
|
||||||
|
- Alert notices may be dampened to only trigger after a condition persists. This
|
||||||
|
avoids the usual pager meltdown when something happens and no delay is used.
|
||||||
|
|
||||||
|
- Maintenance actions such as battery runtime calibration are available where
|
||||||
|
supported by the UPS hardware.
|
||||||
|
|
||||||
|
- Power statistics can be logged in custom formats for later retrieval and analysis
|
||||||
|
|
||||||
|
- All drivers are started and stopped with one common program. Starting one is
|
||||||
|
as easy as starting ten: 'upsdrvctl start'.
|
||||||
|
|
||||||
|
- Shutdowns and other procedures may be tested without stressing actual UPS
|
||||||
|
hardware by simulating status values with the dummy-ups pseudo-driver. Anything
|
||||||
|
which can happen in a driver can be replicated with dummy-ups.
|
||||||
|
|
||||||
|
Monitoring diagrams
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
These are the most common situations for monitoring UPS hardware. Other ways are
|
||||||
|
possible, but they are mostly variants on these four.
|
||||||
|
|
||||||
|
NOTE: these examples show serial communications for simplicity, but USB or SNMP
|
||||||
|
or any other monitoring is also possible.
|
||||||
|
|
||||||
|
"Simple" configuration
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
image:images/simple.png[]
|
||||||
|
|
||||||
|
One UPS, one computer. This is also known as "Standalone" configuration.
|
||||||
|
|
||||||
|
This is the configuration that most users will use. You need at least a driver,
|
||||||
|
upsd, and upsmon running.
|
||||||
|
|
||||||
|
"Advanced" configuration
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
image:images/advanced.png[]
|
||||||
|
|
||||||
|
One UPS, multiple computers. Only one of them can actually talk to the UPS
|
||||||
|
directly. That's where the network comes in. The Master system runs the driver,
|
||||||
|
upsd, and upsmon in master mode. The Slave systems only run upsmon in slave mode.
|
||||||
|
|
||||||
|
This is useful when you have a very large UPS that's capable of running multiple
|
||||||
|
systems simultaneously. There is no longer the need to buy a bunch of individual
|
||||||
|
UPSes or "sharing" hardware, since this software will handle the sharing for you.
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
*FIXME* remainder
|
||||||
|
=== One UPS, many clients ===
|
||||||
|
|
||||||
|
- Multiple systems may monitor a single UPS using only their network connections - no special "UPS sharing" hardware is required.
|
||||||
|
|
||||||
|
- "Slave and master" monitoring design synchronizes shutdowns so that slaves can bring down their operating systems cleanly before the master switches off the power.
|
||||||
|
|
||||||
|
=== Many UPSes, many clients ===
|
||||||
|
|
||||||
|
- Each upsd process can serve status data for multiple UPSes to many clients.
|
||||||
|
|
||||||
|
- Each upsmon process can monitor multiple UPSes for status data.
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
"Big Box" configuration
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
image:images/bigbox.png[]
|
||||||
|
|
||||||
|
Some systems have multiple power supplies and cords. You typically find this on
|
||||||
|
high-end servers that allow hot-swap and other fun features. In this case, you
|
||||||
|
run multiple drivers (one per UPS), a single upsd, and a single upsmon (as
|
||||||
|
master for both UPS 1 and UPS 2)
|
||||||
|
|
||||||
|
This software understands that some of these servers can also run with some of
|
||||||
|
the supplies gone. For this reason, every UPS is assigned a "power value" - the
|
||||||
|
quantity of power supplies that it feeds on a system.
|
||||||
|
The total available "power value" is compared to the minimum that is required
|
||||||
|
for that hardware. For example, if you have 3 power supplies and 3 UPSes, but
|
||||||
|
only 2 supplies must be running at any given moment, the minimum would be 2.
|
||||||
|
This means that you can safely lose any one UPS and the software will handle it
|
||||||
|
properly by remaining online.
|
||||||
|
|
||||||
|
"Bizarre" configuration
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
image:images/bizarre.png[]
|
||||||
|
|
||||||
|
You can even have a UPS that has the serial port connected to a system that it's
|
||||||
|
not feeding. Sometimes a PC will be close to a UPS that needs to be monitored,
|
||||||
|
so it's drafted to supply a serial port for the purpose. This PC may in fact be
|
||||||
|
getting power from some other UPS. This is not a problem.
|
||||||
|
|
||||||
|
The first system ("mixed") is a Master for UPS 1, but is only monitoring UPS 2.
|
||||||
|
The other systems are Slaves of UPS 2.
|
||||||
|
|
||||||
|
Image credits
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Thanks to Luc Descotils and Arnaud Quette at Eaton for providing shiny
|
||||||
|
cleaned-up graphics.
|
|
@ -1,10 +1,8 @@
|
||||||
Desc: How to make a new subdriver to support another USB/HID UPS
|
How to make a new subdriver to support another USB/HID UPS
|
||||||
File: hid-subdrivers.txt
|
----------------------------------------------------------
|
||||||
Date: 08 January 2007
|
|
||||||
Auth: Peter Selinger <selinger@users.sourceforge.net>
|
|
||||||
|
|
||||||
Overall concept
|
Overall concept
|
||||||
===============
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
USB (Universal Serial Port) devices can be divided into several
|
USB (Universal Serial Port) devices can be divided into several
|
||||||
different classes (audio, imaging, mass storage etc). Almost all UPS
|
different classes (audio, imaging, mass storage etc). Almost all UPS
|
||||||
|
@ -15,7 +13,7 @@ for reading and writing information (such as x/y coordinates and
|
||||||
button states, in case of a mouse, or voltages and status information,
|
button states, in case of a mouse, or voltages and status information,
|
||||||
in case of a UPS).
|
in case of a UPS).
|
||||||
|
|
||||||
The Nut "usbhid-ups" driver is a meta-driver that handles all HID UPS
|
The NUT "usbhid-ups" driver is a meta-driver that handles all HID UPS
|
||||||
devices. It consists of a core driver that handles most of the work of
|
devices. It consists of a core driver that handles most of the work of
|
||||||
talking to the USB hardware, and several sub-drivers to handle
|
talking to the USB hardware, and several sub-drivers to handle
|
||||||
specific UPS manufacturers (MGE, APC, and Belkin are currently
|
specific UPS manufacturers (MGE, APC, and Belkin are currently
|
||||||
|
@ -31,7 +29,7 @@ add support for such a device, read new-drivers.txt and see the
|
||||||
tripplite_usb driver for inspiration.
|
tripplite_usb driver for inspiration.
|
||||||
|
|
||||||
HID Usage Tree
|
HID Usage Tree
|
||||||
==============
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
From the point of view of writing a HID subdriver, a HID device
|
From the point of view of writing a HID subdriver, a HID device
|
||||||
consists of a bunch of variables. Some variables (such as the current
|
consists of a bunch of variables. Some variables (such as the current
|
||||||
|
@ -44,14 +42,17 @@ for a typical APC device. Variable components are separated by ".".
|
||||||
Typical values for each variable are also shown for illustrative
|
Typical values for each variable are also shown for illustrative
|
||||||
purposes.
|
purposes.
|
||||||
|
|
||||||
UPS.Battery.Voltage 11.4 V
|
[width="35%"]
|
||||||
UPS.Battery.ConfigVoltage 12 V
|
|================================================
|
||||||
UPS.Input.Voltage 117 V
|
|UPS.Battery.Voltage | 11.4 V
|
||||||
UPS.Input.ConfigVoltage 120 V
|
|UPS.Battery.ConfigVoltage | 12 V
|
||||||
UPS.AudibleAlarmControl 2 (=enabled)
|
|UPS.Input.Voltage | 117 V
|
||||||
UPS.PresentStatus.Charging 1 (=yes)
|
|UPS.Input.ConfigVoltage | 120 V
|
||||||
UPS.PresentStatus.Discharging 0 (=no)
|
|UPS.AudibleAlarmControl | 2 (=enabled)
|
||||||
UPS.PresentStatus.ACPresent 1 (=yes)
|
|UPS.PresentStatus.Charging | 1 (=yes)
|
||||||
|
|UPS.PresentStatus.Discharging | 0 (=no)
|
||||||
|
|UPS.PresentStatus.ACPresent | 1 (=yes)
|
||||||
|
|================================================
|
||||||
|
|
||||||
As you can see, variables that describe the battery status might be
|
As you can see, variables that describe the battery status might be
|
||||||
grouped together under "Battery", variables that describe the input
|
grouped together under "Battery", variables that describe the input
|
||||||
|
@ -78,10 +79,11 @@ strings, but as numbers (called "usages" in HID terminology). These
|
||||||
numbers are defined in the "HID Usage Tables", available from
|
numbers are defined in the "HID Usage Tables", available from
|
||||||
http://www.usb.org/developers/hidpage/. The standard usages for UPS
|
http://www.usb.org/developers/hidpage/. The standard usages for UPS
|
||||||
devices are defined in a document called "Usage Tables for HID Power
|
devices are defined in a document called "Usage Tables for HID Power
|
||||||
Devices".
|
Devices" (the Power Device Class [PDC] specification).
|
||||||
|
|
||||||
For example,
|
For example:
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
0x00840010 = UPS
|
0x00840010 = UPS
|
||||||
0x00840012 = Battery
|
0x00840012 = Battery
|
||||||
0x00840030 = Voltage
|
0x00840030 = Voltage
|
||||||
|
@ -89,25 +91,28 @@ For example,
|
||||||
0x0084001a = Input
|
0x0084001a = Input
|
||||||
0x0084005a = AudibleAlarmControl
|
0x0084005a = AudibleAlarmControl
|
||||||
0x00840002 = PresentStatus
|
0x00840002 = PresentStatus
|
||||||
0x00850044 = Charging
|
0x00850044 = Charging
|
||||||
0x00850045 = Discharging
|
0x00850045 = Discharging
|
||||||
0x008500d0 = ACPresent
|
0x008500d0 = ACPresent
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Thus, the above usage tree is internally represented as
|
Thus, the above usage tree is internally represented as:
|
||||||
|
|
||||||
00840010.00840012.00840030
|
--------------------------------------------------------------------------------
|
||||||
00840010.00840012.00840040
|
00840010.00840012.00840030
|
||||||
00840010.0084001a.00840030
|
00840010.00840012.00840040
|
||||||
00840010.0084001a.00840040
|
00840010.0084001a.00840030
|
||||||
00840010.0084005a
|
00840010.0084001a.00840040
|
||||||
00840010.00840002.00850044
|
00840010.0084005a
|
||||||
00840010.00840002.00850045
|
00840010.00840002.00850044
|
||||||
00840010.00840002.008500d0
|
00840010.00840002.00850045
|
||||||
|
00840010.00840002.008500d0
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
To make matters worse, most manufacturers define their own additional
|
To make matters worse, most manufacturers define their own additional
|
||||||
usages, even in cases where standard usages could have been used. for
|
usages, even in cases where standard usages could have been used. for
|
||||||
example Belkin defines 00860040 = ConfigVoltage (which is incidentally
|
example Belkin defines `00860040` = ConfigVoltage (which is incidentally
|
||||||
a violation of the USB specification, as 00860040 is reserved for
|
a violation of the USB PDC specification, as `00860040` is reserved for
|
||||||
future use).
|
future use).
|
||||||
|
|
||||||
Thus, subdrivers generally need to provide:
|
Thus, subdrivers generally need to provide:
|
||||||
|
@ -120,8 +125,9 @@ such as custom implementations of specific instant commands (load.off,
|
||||||
shutdown.restart), and conversions of manufacturer specific data
|
shutdown.restart), and conversions of manufacturer specific data
|
||||||
formats.
|
formats.
|
||||||
|
|
||||||
|
|
||||||
Writing a subdriver
|
Writing a subdriver
|
||||||
===================
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
In preparation for writing a subdriver for a device that is currently
|
In preparation for writing a subdriver for a device that is currently
|
||||||
unsupported, run usbhid-ups with the following command line:
|
unsupported, run usbhid-ups with the following command line:
|
||||||
|
@ -143,7 +149,7 @@ CUSTOMIZATION below).
|
||||||
|
|
||||||
Use the script as follows:
|
Use the script as follows:
|
||||||
|
|
||||||
scripts/subdriver/path-to-subdriver.sh < /tmp/info
|
scripts/subdriver/path-to-subdriver.sh < /tmp/info
|
||||||
|
|
||||||
where /tmp/info is the file where you previously saved the debugging
|
where /tmp/info is the file where you previously saved the debugging
|
||||||
information.
|
information.
|
||||||
|
@ -168,16 +174,22 @@ attempts to monitor some UPS variables. To make this driver useful,
|
||||||
you must examine the NUT variables of the form "unmapped.*" in the
|
you must examine the NUT variables of the form "unmapped.*" in the
|
||||||
hid_info_t data structure, and map them to actual NUT variables and
|
hid_info_t data structure, and map them to actual NUT variables and
|
||||||
instant commands. There are currently no step-by-step instructions for
|
instant commands. There are currently no step-by-step instructions for
|
||||||
how to do this. Please look at the files
|
how to do this. Please look at the files to see how the currently implemented
|
||||||
|
subdrivers are written.:
|
||||||
|
|
||||||
mge-hid.c/h
|
- apc-hid.c/h
|
||||||
apc-hid.c/h
|
- belkin-hid.c/h
|
||||||
belkin-hid.c/h
|
- cps-hid.c/h
|
||||||
|
- explore-hid.c/h
|
||||||
|
- libhid.c/h
|
||||||
|
- liebert-hid.c/h
|
||||||
|
- mge-hid.c/h
|
||||||
|
- powercom-hid.c/h
|
||||||
|
- tripplite-hid.c/h
|
||||||
|
|
||||||
to see how the currently implemented subdrivers are written.
|
|
||||||
|
|
||||||
Shutting down the UPS
|
Shutting down the UPS
|
||||||
=====================
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
It is desireable to support shutting down the UPS. Usually (for
|
It is desireable to support shutting down the UPS. Usually (for
|
||||||
devices that follow the HID Power Device Class specification), this
|
devices that follow the HID Power Device Class specification), this
|
||||||
|
@ -191,31 +203,31 @@ commands to the UPS in response to sending one NUT command to the
|
||||||
driver, this is handled by the driver. In order to make this work,
|
driver, this is handled by the driver. In order to make this work,
|
||||||
you need to define the following four NUT values:
|
you need to define the following four NUT values:
|
||||||
|
|
||||||
ups.delay.start (variable, R/W)
|
ups.delay.start (variable, R/W)
|
||||||
ups.delay.shutdown (variable, R/W)
|
ups.delay.shutdown (variable, R/W)
|
||||||
load.off.delay (command)
|
load.off.delay (command)
|
||||||
load.on.delay (command)
|
load.on.delay (command)
|
||||||
|
|
||||||
If the UPS supports it, the following variables can be used to show
|
If the UPS supports it, the following variables can be used to show
|
||||||
the countdown to start/shutdown:
|
the countdown to start/shutdown:
|
||||||
|
|
||||||
ups.timer.start (variable, R/O)
|
ups.timer.start (variable, R/O)
|
||||||
ups.timer.shutdown (variable, R/O)
|
ups.timer.shutdown (variable, R/O)
|
||||||
|
|
||||||
The 'load.on' and 'load.off' commands will be defined implicitly by
|
The `load.on` and `load.off` commands will be defined implicitly by
|
||||||
the driver (using a delay value of '0'). Define these commands
|
the driver (using a delay value of '0'). Define these commands
|
||||||
yourself, if your UPS requires a different value to switch on/off
|
yourself, if your UPS requires a different value to switch on/off
|
||||||
the load without delay.
|
the load without delay.
|
||||||
|
|
||||||
Note that the driver expects the 'load.off.delay' and 'load.on.delay'
|
Note that the driver expects the `load.off.delay` and `load.on.delay`
|
||||||
to follow the HID Power Device Class specification, which means that
|
to follow the HID Power Device Class specification, which means that
|
||||||
the 'load.on.delay' command should NOT switch on the load in the
|
the `load.on.delay` command should NOT switch on the load in the
|
||||||
absence of mains power. If your UPS switches on the load regardless of
|
absence of mains power. If your UPS switches on the load regardless of
|
||||||
the mains status, DO NOT define this command. You probably want to
|
the mains status, DO NOT define this command. You probably want to
|
||||||
define the 'shutdown.return' and/or 'shutdown.stayoff' commands in
|
define the `shutdown.return` and/or `shutdown.stayoff` commands in
|
||||||
that case. Commands defined in the subdriver will take precedence over
|
that case. Commands defined in the subdriver will take precedence over
|
||||||
the ones that are composed in the driver.
|
the ones that are composed in the driver.
|
||||||
|
|
||||||
When running the driver with the '-k' flag, it will first attempt to
|
When running the driver with the '-k' flag, it will first attempt to
|
||||||
send a 'shutdown.return' command and if that fails, will fallback to
|
send a `shutdown.return` command and if that fails, will fallback to
|
||||||
'shutdown.reboot'.
|
`shutdown.reboot`.
|
||||||
|
|
335
docs/history.txt
Normal file
|
@ -0,0 +1,335 @@
|
||||||
|
ifdef::website[]
|
||||||
|
Project history
|
||||||
|
===============
|
||||||
|
endif::website[]
|
||||||
|
|
||||||
|
This page is an attempt to document how everything came together.
|
||||||
|
|
||||||
|
The Network UPS Tools team would like to warmly thank Russell Kroll.
|
||||||
|
|
||||||
|
Russell initially started this project, maintaining and improving it for
|
||||||
|
over 8 years (1996 - mid 2005).
|
||||||
|
|
||||||
|
Prototypes and experiments
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
May 1996: early status hacks
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
APC's Powerchute was running on kadets.d20.co.edu (a BSD/OS box) with
|
||||||
|
SCO binary emulation. Early test versions ran in cron, pulled status
|
||||||
|
from the log files and wrote them to a .plan file. You could see the
|
||||||
|
results by fingering `pwrchute@kadets.d20.co.edu` while it lasted:
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Last login Sat May 11 21:33 (MDT) on ttyp0 from intrepid.rmi.net
|
||||||
|
Plan:
|
||||||
|
Welcome to the UPS monitor service at kadets.d20.co.edu.
|
||||||
|
The Smart-UPS attached to kadets generated a report at 14:24:01 on 05/17/96.
|
||||||
|
During the measured period, the following data points were taken:
|
||||||
|
Voltage ranged from 115.0 VAC to 116.3 VAC.
|
||||||
|
The UPS generated 116.3 VAC at 60.00 Hz.
|
||||||
|
The battery level was at 27.60 volts.
|
||||||
|
The load placed on the UPS was 024.9 percent.
|
||||||
|
UPS temperature was measured at 045.0 degrees Celsius.
|
||||||
|
Measurements are taken every 10 minutes by the upsd daemon.
|
||||||
|
This report is generated by a script written by Russell Kroll<rkroll@kadets>.
|
||||||
|
Modified for compatibility with the BSD/OS cron daemon by Neil Schroeder
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
This same status data could also be seen with a web browser, since we
|
||||||
|
had rigged up a CGI wrapper script which called finger.
|
||||||
|
|
||||||
|
|
||||||
|
January 1997: initial protocol tests
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Initial tests with a freestanding non-daemon program provided a few
|
||||||
|
basic status registers from the UPS. The 940-0024C cable was not yet
|
||||||
|
understood, so this happened over the [attachment:apcevilhack.jpg evil
|
||||||
|
two-wire serial hack].
|
||||||
|
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
Communicating with SMART-UPS 700 S/N WS9643050926 [10/17/96]
|
||||||
|
Input voltage range: 117.6 VAC - 118.9 VAC
|
||||||
|
Load is 010.9% of capacity, battery is charged to 100.0% of capacity
|
||||||
|
------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Note that today's apcsmart driver still displays the serial number when
|
||||||
|
it starts, since it is derived from this original code.
|
||||||
|
|
||||||
|
September 1997: first client/server code
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The first split daemon/client code was written. upsd spoke directly to
|
||||||
|
the UPS (APC Smart models only) and communicated with upsc by sending
|
||||||
|
binary structures in UDP datagrams.
|
||||||
|
|
||||||
|
The first CGI interface existed, but it was all implemented with shell
|
||||||
|
scripts. The main script would call upsc to retrieve status values. Then
|
||||||
|
it would cat a template file through sed to plug them into the page.
|
||||||
|
|
||||||
|
image::images/old-cgi.png[Old CGI screenshot]
|
||||||
|
|
||||||
|
upsstats actually has since returned to using templates, despite having
|
||||||
|
a period in the middle when it used hardcoded HTML.
|
||||||
|
|
||||||
|
The images were also created with shell scripts. Each script would call
|
||||||
|
upsc to get the right value (utility, upsload, battcap). It then took
|
||||||
|
the value, plugged it into a command file with sed, and passed that into
|
||||||
|
'fly', a program which used an interpreted language to create images.
|
||||||
|
fly actually uses gd, just like upsimage does today.
|
||||||
|
|
||||||
|
This code later evolved into Smart UPS Tools 0.10.
|
||||||
|
|
||||||
|
Smart UPS Tools
|
||||||
|
---------------
|
||||||
|
|
||||||
|
March 1998: first public release
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Version 0.10 was released on March 10, 1998. It used the same design as
|
||||||
|
the pre-release prototype. This made expansion difficult as the binary
|
||||||
|
structure used for network communications would break any time a new
|
||||||
|
variable was added. Due to byte-ordering and struct alignment issues,
|
||||||
|
the code usually couldn't talk over the network to a system with a
|
||||||
|
different architecture. It was also hopelessly bound to one type of UPS
|
||||||
|
hardware.
|
||||||
|
|
||||||
|
Five more releases followed with this design followed. The last was
|
||||||
|
0.34, released October 27, 1998.
|
||||||
|
|
||||||
|
June 1999: Redesigned, rewritten
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Following a long period of inactivity and two months of prerelease
|
||||||
|
testing versions, 0.40.0 was released on June 5, 1999. It featured a
|
||||||
|
complete redesign and rewrite of all of the code. The layering was now
|
||||||
|
in three pieces, with the single driver (smartups) separate from the
|
||||||
|
server (upsd).
|
||||||
|
|
||||||
|
Clients remained separate as before and still used UDP to talk to the
|
||||||
|
server, but they now used a text-based protocol instead of the brittle
|
||||||
|
binary structs. A typical request like "REQ UTILITY" would be answered
|
||||||
|
with "ANS UTILITY 120.0".
|
||||||
|
|
||||||
|
The ups-trust425-625 driver appeared shortly after the release of
|
||||||
|
0.40.0, marking the first expansion beyond APC hardware.
|
||||||
|
|
||||||
|
Over the months that followed, the backupspro driver would be forked
|
||||||
|
from the smartups driver to handle the APC Back-UPS Pro line. Then the
|
||||||
|
backups driver was written to handle the APC Back-UPS contact-closure
|
||||||
|
models. These drivers would later be renamed and recombined, with
|
||||||
|
smartups and backupspro becoming apcsmart, and backups became genericups.
|
||||||
|
|
||||||
|
The drivers stored status data in an array. At first, they passed this data to
|
||||||
|
upsd by saving it to a file. upsd would reread this file every few seconds to
|
||||||
|
keep a copy for itself. This was later expanded to allow shared memory mode,
|
||||||
|
where only a stub would remain on the disk. The drivers and server then passed
|
||||||
|
data through the shared memory space.
|
||||||
|
|
||||||
|
upsd picked up the ability to monitor multiple drivers on the system, and the
|
||||||
|
"upsname@hostname" scheme was born. Access controls were added, and then the
|
||||||
|
network code was expanded to allow TCP communications, which at this point were
|
||||||
|
on port 3305.
|
||||||
|
|
||||||
|
|
||||||
|
Network UPS Tools
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
September 1999: new name, new URL
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Several visitors to the web page and subscribers to the mailing lists provided
|
||||||
|
suggestions to rename the project. The old name no longer accurately described
|
||||||
|
it, and it was perilously close to APC's "Smart-UPS" trademark. Rather than risk
|
||||||
|
problems in the future, the name was changed. Kern Sibbald provided the winner:
|
||||||
|
Network UPS Tools, which captures the essence of the project and makes for great
|
||||||
|
short tarball filenames: nut-x.y.z.tar.gz.
|
||||||
|
|
||||||
|
The new name was first applied to 0.42.0, released October 31, 1999. This is
|
||||||
|
also when the web pages moved from the old `http://www.exploits.org/~rkroll/smartupstools/`
|
||||||
|
URL to the replacement at `http://www.exploits.org/nut/` to coincide with the
|
||||||
|
name change.
|
||||||
|
|
||||||
|
More drivers were written and the hardware support continued to grow. upsmon
|
||||||
|
picked up the concepts of "master" and "slave", and could now handle
|
||||||
|
environments where multiple systems get power from a single UPS. Manager mode
|
||||||
|
was added to allow changing the value of read/write variables in certain UPS
|
||||||
|
models.
|
||||||
|
|
||||||
|
June 2001: common driver core
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Up to this point, all of the drivers compiled into freestanding programs, each
|
||||||
|
providing their own implementation of main(). This meant they all had to check
|
||||||
|
the incoming arguments and act uniformly. Unfortunately, not all of the programs
|
||||||
|
behaved the same way, and it was hard to document and use consistently. It also
|
||||||
|
meant that startup scripts had to be edited depending on what kind of hardware
|
||||||
|
was attached.
|
||||||
|
|
||||||
|
Starting in 0.45.0, released June 11, 2001, there was a new common core for all drivers called main.c. It provided the main function and called back to the upsdrv_* functions provided by the hardware-specific part of the drivers. This allowed driver authors to focus on the UPS hardware without worrying about the housekeeping stuff that needs to happen.
|
||||||
|
|
||||||
|
This new design provided an obvious way to configure drivers from one file, and ups.conf was born. This eventually spawned upsdrvctl, and now all drivers based on this common core could be started or stopped with one command. Startup scripts now could contain "upsdrvctl start", and it didn't matter what kind of hardware or how many UPSes you had on one system.
|
||||||
|
|
||||||
|
Interestingly, at the end of this month, Arnaud Quette entered the UPS world, as a subcontractor of the now defunct MGE UPS SYSTEMS.
|
||||||
|
This marks the start of a future successful collaboration.
|
||||||
|
|
||||||
|
May 2002: casting off old drivers, IANA port, towards 1.0
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
During the 0.45.x series, both the old standalone drivers and the ones which had been converted to the common core were released together. Before the release of 0.50.0 on May 24, 2002, all of the old drivers were removed. While this shrank the list of supported hardware, it set the precedent for removing code which isn't receiving regular maintenance. The assumption is that the code will be brought back up to date by someone if they actually need it. Otherwise, it's just dead weight in the tree.
|
||||||
|
|
||||||
|
This change meant that all drivers could be controlled with upsdrvctl and ups.conf, allowing the documentation to be greatly simplified. There was no longer any reason to say "do this, unless you have this driver, then do this".
|
||||||
|
|
||||||
|
IANA granted an official port number to the project, and the network code switched to port 3493. It had previously been on 3305 which is assigned to odette-ftp. 3305 was probably picked in 1997 because it was the fifth project to spawn from some common UDP server code.
|
||||||
|
|
||||||
|
After 0.50.1, the 0.99 tree was created to provide a tree which would receive nothing but bug fixes in preparation for the release of 1.0. As it turned out, very few things required fixing, and there were only three releases in this tree.
|
||||||
|
|
||||||
|
Leaving 0.x territory
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
August 2002: first stable tree: NUT 1.0.0
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
After nearly 5 years of having a 0.x version number, 1.0.0 was released on August 19, 2002. This milestone meant that all of the base features that you would expect to find were intact: good hardware support, a network server with security controls, and system shutdowns that worked.
|
||||||
|
|
||||||
|
The design was showing signs of wear from the rapid expansion, but this was intentionally ignored for the moment. The focus was on getting a good version out that would provide a reasonable base while the design issues could be addressed in the future, and I'm confident that we succeeded.
|
||||||
|
|
||||||
|
November 2002: second stable tree: NUT 1.2.0
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
One day after the release of 1.0.0, 1.1.0 started the new development tree. During that development cycle, the CGI programs were rewritten to use templates instead of hard-coded HTML, thus bringing back the flexibility of the original unreleased prototype from 5 years before. multimon was removed from the tree, as the new upsstats could do both jobs by loading different templates.
|
||||||
|
|
||||||
|
A new client library called upsclient was created, and it replaced upsfetch. This new library only supported TCP connections, and used an opaque context struct to keep state for each connection. As a result, client programs could now do things that used multiple connections without any conflicts. This was done primarily to allow OpenSSL support, but there were other benefits from the redesign.
|
||||||
|
|
||||||
|
upsd and the clients could now use OpenSSL for basic authentication and encryption, but this was not included by default. This was provided as a bonus feature for those users who cared to read about it and enable the option, as the initial setup was complex.
|
||||||
|
|
||||||
|
After the 1.1 tree was frozen and deemed complete, it became the second stable tree with the release of 1.2.0 on November 5, 2002.
|
||||||
|
|
||||||
|
April 2003: new naming scheme, better driver glue, and an overhauled protocol
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Following an extended period with no development tree, 1.3.0 got things moving again on April 13, 2003. The focus of this tree was to rewrite the driver-server communication layer and replace the static naming scheme for variables and commands.
|
||||||
|
|
||||||
|
Up to this point, all variables had names like STATUS, UTILITY, and OUTVOLT. They had been created as drivers were added to the tree, and there was little consistency. For example, it probably should have been INVOLT and OUTVOLT, but there was no OUTVOLT originally, so UTILITY was all we had. This same pattern repeated with ACFREQ - is it incoming or outgoing? - and many more.
|
||||||
|
|
||||||
|
To solve this problem, all variables and commands were renamed to a hierarchical scheme that had obvious grouping. STATUS became ups.status. UTILITY turned into input.voltage, and OUTVOLT is output.voltage. ACFREQ is input.frequency, and the new output.frequency is also now supported. Every other variable or command was renamed in this fashion.
|
||||||
|
|
||||||
|
These variables had been shared between the drivers and upsd as values. That is, for each name like STATUS, there was a #define somewhere in the tree with an INFO_ prefix that gave it a number. INFO_STATUS was 0x0006, INFO_UTILITY was 0x0004, and so on, with each name having a matching number. This number was stored in an int within a structure which was part of the array that was either written to disk or shared memory.
|
||||||
|
|
||||||
|
That structure had several restrictions on expansion and was dropped as the data sharing method between the drivers and the server. It was replaced by a new system of text-based messages over Unix domain sockets. Drivers now accepted a short list of commands from upsd, and would push out updates asynchronously. upsd no longer had to poll the state files or shared memory. It could just select all of the driver and client fds and act on events.
|
||||||
|
|
||||||
|
At the same time, the network protocol on port 3493 was overhauled to take advantage of the new naming scheme. The existing "REQ STATUS@su700", "ANS STATUS@su700 OL" scheme was showing signs of age, and it really only supported the UPS name (@su700) as an afterthought. The new protocol would now use commands like GET and LIST, leading to exchanges like "GET VAR su700 ups.status" and "VAR su700 ups.status OL". The responses contain enough data to stand alone, so clients can now handle them asynchronously.
|
||||||
|
|
||||||
|
July 2003: third stable tree: NUT 1.4.0
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
On July 25, 2003, 1.4.0 was released. It contained support for both the old "REQ" style protocol (with names like STATUS), and the new "GET" style protocol (with names like ups.status). This tree is provided to bridge the gap between all of the old releases and the upcoming 2.0.
|
||||||
|
|
||||||
|
2.0 will be released without support for the old REQ/STATUS protocol. The hope is that client authors and those who have implemented their own monitoring software will use the 1.4 cycle to change to the new protocol. The 1.4 releases contain a lot of compatibility code to make sure both work at the same time.
|
||||||
|
|
||||||
|
July 2003: pushing towards 2.0
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
1.5.0 forked from 1.4.0 and was released on July 29, 2003. The first changes were to throw out anything which was providing compatibilty with the older versions of the software. This means that 1.5 and the eventual 2.0 will not talk to anything older than 1.4.
|
||||||
|
|
||||||
|
This tree continues to evolve with new serial routines for the drivers which are intended to replace the aging upscommon code which dates back to the early 0.x releases. The original routines would call alarm and read in a tight loop while fetching characters. The new functions are much cleaner, and wait for data with select. This makes for much cleaner code and easier strace/ktrace logs, since the number of syscalls has been greatly reduced.
|
||||||
|
|
||||||
|
There has also been a push to make sure the data from the UPS is well-formed and is actually usable before sending updates out to upsd. This started during 1.3 as drivers were adapted to use the dstate functions and the new variable/command names. Some drivers which were not converted to the new naming scheme or didn't do sanity checks on the incoming UPS data from the serial port were dropped from the tree.
|
||||||
|
|
||||||
|
This tree was released as 2.0.0.
|
||||||
|
|
||||||
|
networkupstools.org
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
November 2003: a new URL
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The bandwidth demands of a project like this have slowly been forcing me to offload certain parts to other servers. The download links have pointed offsite for many months, and other large things like certain UPS protocols have followed. As the traffic grows, it's clear that having the project attached to exploits.org is not going to work.
|
||||||
|
|
||||||
|
The solution was to register a new domain and set up mirrors. There are two initial web servers, with more on the way. The main project URL has changed from `http://www.exploits.org/nut/` to http://www.networkupstools.org. The actual content is hosted on various mirrors which are updated regularly with rsync, so the days of dribbling bits through my DSL should be over.
|
||||||
|
|
||||||
|
This is also when all of the web pages were redesigned to have a simpler look with fewer links on the left side. The old web pages used to have 30 or more links on the top page, and most of them vanished when you dropped down one level. The links are now constant on the entire site, and the old links now live in their own groups in separate directories.
|
||||||
|
|
||||||
|
Second major version
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
March 2004: NUT 2.0.0
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
NUT 2.0.0 arrived on March 23, 2004. The jump to version 2 shows the difference
|
||||||
|
in the protocols and naming that happened during the 1.3 and 1.5 development
|
||||||
|
series. 2.0 no longer ships with backwards compatibility code, so it's smaller
|
||||||
|
and cleaner than 1.4.
|
||||||
|
|
||||||
|
|
||||||
|
The change of leadership
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
February 2005: NUT 2.0.1
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The year 2004 was marked by a release slowdown, since Russell was busy with
|
||||||
|
personal subjects. But the patches queue was still growing quickly.
|
||||||
|
|
||||||
|
At that time, the development process was still centralized. There was no
|
||||||
|
revision control system (like the current Subversion repository), nor trackers
|
||||||
|
to interact with NUT development.
|
||||||
|
Russell was receiving all the patches and requests, and doing all the work on
|
||||||
|
his own, including releases.
|
||||||
|
|
||||||
|
Russell was more and more thinking about giving the project leadership to
|
||||||
|
Arnaud Quette, which finally happened with the 2.0.1 release in February 2005.
|
||||||
|
|
||||||
|
This marked a new era for NUT...
|
||||||
|
|
||||||
|
First, Arnaud aimed at opening up the development by creating a project on the
|
||||||
|
http://www.debian.org/[Debian] http://alioth.debian.org/projects/nut/[Alioth Forge].
|
||||||
|
This allowed to build the team of hackers that Russell dreamed about.
|
||||||
|
It also allows to ensure NUT's continuation, whatever happens to
|
||||||
|
the leader. And that would most of all boost the projects contributions.
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
*sandbox*
|
||||||
|
|
||||||
|
TO BE COMPLETED + ADD A LINK TO IDEA / FUTURE
|
||||||
|
|
||||||
|
link on the team + history
|
||||||
|
|
||||||
|
mention:
|
||||||
|
- MGE supporting officially,
|
||||||
|
- USB / SNMP / XML drivers (first non serial drivers),
|
||||||
|
- Power Management (HAL) bridging,
|
||||||
|
- PDU support,
|
||||||
|
- perl / python support...
|
||||||
|
- client history and evolution (wmnut: 01/01/2002)
|
||||||
|
|
||||||
|
release history
|
||||||
|
<LI>July 7, 2008: Client activity: new client <A HREF="http://www.lestat.st/informatique/projets/nut-monitor-en">NUT-Monitor</A>
|
||||||
|
<LI>June 27, 2008: Client activity: new Python class <A HREF="http://www.lestat.st/informatique/projets/pynut-en">PyNUT</A>
|
||||||
|
<LI>June 19, 2008: Client activity: <A HREF="http://www.knut.noveradsl.cz/knutclient/">KNutClient 0.9.4</A>
|
||||||
|
<LI>May 7, 2008: 2.2.2 released
|
||||||
|
<LI>December 21, 2007: 2.2.1 released
|
||||||
|
<LI>August 31, 2007: Client activity: <A HREF="http://rudd-o.com/projects/ups-monitor/">UPS Monitor</A> link update
|
||||||
|
<LI>August 31, 2007: Client activity: <A HREF="http://sourceforge.net/projects/winnutclient/">Windows NUT client 1.5.0</A>
|
||||||
|
<LI>July 5, 2007: 2.2.0 released
|
||||||
|
<LI>June 5, 2007: Client activity: <A HREF="http://collectd.org/">collectd NUT plugin</A>
|
||||||
|
<LI>April 10, 2007: Client activity: <A HREF="http://www.knut.noveradsl.cz/knutclient/">KNutClient 0.9.3</A>
|
||||||
|
<LI>January 15, 2007: 2.0.5 released
|
||||||
|
<LI>January 8, 2007: Client activity: <A HREF="http://sourceforge.net/projects/winnutclient/">Windows NUT client</A>
|
||||||
|
<!-- LI>July 27, 2006: 2.0.4 released
|
||||||
|
<LI>February 7, 2006: 2.0.3 released
|
||||||
|
<LI>June 27, 2005: 2.0.2 released
|
||||||
|
<LI>June 15, 2005: new <A HREF="lists/index.html">mailing lists</A> ready on <A HREF="http://alioth.debian.org/mail/?group_id=30602">Alioth</A>
|
||||||
|
<LI>April 15, 2005: new development infrastructure ready on <A HREF="http://alioth.debian.org/projects/nut/">Alioth</A>
|
||||||
|
<LI>March 15, 2005: Client activity: first beta of MGE <A HREF="http://www.mgeups.com/products/pdt230/software/sp97/solpaclinux.htm">Personal Solution Pac</A>
|
||||||
|
<LI>March 11, 2005: Client activity: <A HREF="http://www.amautacorp.com/staff/Rudd-O/projects/pages/ups-front">UPS Monitor</A> 0.8 released
|
||||||
|
<LI>February 24, 2005: 2.0.1 released
|
||||||
|
|
||||||
|
Note: use the NEWS file!
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
BIN
docs/images/advanced.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
docs/images/asciidoc.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
docs/images/bigbox.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
docs/images/bizarre.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
docs/images/blue-arrow.png
Normal file
After Width: | Height: | Size: 562 B |
BIN
docs/images/cables/73-0724.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
docs/images/cables/940-0024C.jpg
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
docs/images/cables/Lansafecable.jpg
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
docs/images/cables/SOLA-330.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
docs/images/cables/belkin-f6cx-rkm-xu-cable.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
docs/images/cables/mac-940-0024C.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
docs/images/cables/mge-66049.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
docs/images/cables/mge-db9-rj12.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
docs/images/cables/mge-db9-rj45.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
docs/images/eaton-logo.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
docs/images/note.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
docs/images/nut_layering.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
docs/images/old-cgi.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
docs/images/simple.png
Normal file
After Width: | Height: | Size: 9.9 KiB |
BIN
docs/images/warning.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
114
docs/macros.txt
|
@ -1,66 +1,72 @@
|
||||||
Desc: NUT-specific autoconf macros
|
NUT-specific autoconf macros
|
||||||
File: macros.txt
|
----------------------------
|
||||||
Date: 27 December 2006
|
|
||||||
Auth: Peter Selinger <selinger@users.sourceforge.net>
|
|
||||||
|
|
||||||
The following NUT-specific autoconf macros are defined in the m4/
|
The following NUT-specific autoconf macros are defined in the m4/
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
- Macro: NUT_TYPE_SOCKLEN_T
|
- NUT_TYPE_SOCKLEN_T
|
||||||
- Macro: NUT_TYPE_UINT8_T
|
- NUT_TYPE_UINT8_T
|
||||||
- Macro: NUT_TYPE_UINT16_T
|
- NUT_TYPE_UINT16_T
|
||||||
Check for the corresponding type in the system header files, and
|
|
||||||
#define a replacement if necessary.
|
|
||||||
|
|
||||||
- Macro: NUT_CHECK_LIBGD
|
Check for the corresponding type in the system header files, and
|
||||||
- Macro: NUT_CHECK_LIBHAL
|
#define a replacement if necessary.
|
||||||
- Macro: NUT_CHECK_LIBNEON
|
|
||||||
- Macro: NUT_CHECK_LIBNETSNMP
|
|
||||||
- Macro: NUT_CHECK_LIBPOWERMAN
|
|
||||||
- Macro: NUT_CHECK_LIBSSL
|
|
||||||
- Macro: NUT_CHECK_LIBUSB
|
|
||||||
- Macro: NUT_CHECK_LIBWRAP
|
|
||||||
Determine the compiler flags for the corresponding library. On
|
|
||||||
success, set nut_have_libxxx="yes" and set LIBXXX_CFLAGS and
|
|
||||||
LIBXXX_LDFLAGS. On failure, set nut_have_libxxx="no". This macro
|
|
||||||
can be run multiple times, but will do the checking only once.
|
|
||||||
Here "xxx" should of course be replaced by the respective library name.
|
|
||||||
|
|
||||||
The checks for each library grow organically to compensate for
|
- NUT_CHECK_LIBGD
|
||||||
various bugs in the libraries, pkg-config, etc. This is why we have
|
- NUT_CHECK_LIBHAL
|
||||||
a separate macro for each library.
|
- NUT_CHECK_LIBNEON
|
||||||
|
- NUT_CHECK_LIBNETSNMP
|
||||||
|
- NUT_CHECK_LIBPOWERMAN
|
||||||
|
- NUT_CHECK_LIBSSL
|
||||||
|
- NUT_CHECK_LIBUSB
|
||||||
|
- NUT_CHECK_LIBWRAP
|
||||||
|
|
||||||
- Macro: NUT_CHECK_IPV6
|
Determine the compiler flags for the corresponding library. On
|
||||||
Check for various features required to compile the IPv6 support.
|
success, set nut_have_libxxx="yes" and set LIBXXX_CFLAGS and
|
||||||
dnl Check for various features required for IPv6 support. Define a
|
LIBXXX_LDFLAGS. On failure, set nut_have_libxxx="no". This macro
|
||||||
preprocessor symbol for each individual feature (HAVE_GETADDRINFO,
|
can be run multiple times, but will do the checking only once.
|
||||||
HAVE_FREEADDRINFO, HAVE_STRUCT_ADDRINFO, HAVE_SOCKADDR_STORAGE,
|
Here "xxx" should of course be replaced by the respective library name.
|
||||||
SOCKADDR_IN6, IN6_ADDR, HAVE_IN6_IS_ADDR_V4MAPPED,
|
|
||||||
HAVE_AI_ADDRCONFIG). Also set the shell variable nut_have_ipv6=yes
|
|
||||||
if all the required features are present. Set nut_have_ipv6=no
|
|
||||||
otherwise.
|
|
||||||
|
|
||||||
- Macro: NUT_CHECK_OS
|
The checks for each library grow organically to compensate for
|
||||||
Check for the exact system name and type.
|
various bugs in the libraries, pkg-config, etc. This is why we have
|
||||||
This was only used in the past to determine the packaging rule to be used
|
a separate macro for each library.
|
||||||
through the OS_NAME variable, but may be useful for other purposes in the
|
|
||||||
future.
|
|
||||||
|
|
||||||
- Macro: NUT_REPORT_FEATURE(FEATURE, VALUE)
|
- NUT_CHECK_IPV6
|
||||||
Schedule a line for the end-of-configuration feature summary. The
|
|
||||||
FEATURE is a descriptive string such that the sentence "Checking
|
|
||||||
whether to FEATURE" makes sense, and VALUE describes the decision
|
|
||||||
taken (typically yes or no). The feature is also reported to the
|
|
||||||
terminal.
|
|
||||||
|
|
||||||
- Macro: NUT_REPORT(FEATURE, VALUE)
|
Check for various features required to compile the IPv6 support.
|
||||||
Schedule a line for the end-of-configuration feature summary, without
|
dnl Check for various features required for IPv6 support. Define a
|
||||||
printing anything to the terminal immediately.
|
preprocessor symbol for each individual feature (HAVE_GETADDRINFO,
|
||||||
|
HAVE_FREEADDRINFO, HAVE_STRUCT_ADDRINFO, HAVE_SOCKADDR_STORAGE,
|
||||||
|
SOCKADDR_IN6, IN6_ADDR, HAVE_IN6_IS_ADDR_V4MAPPED,
|
||||||
|
HAVE_AI_ADDRCONFIG). Also set the shell variable nut_have_ipv6=yes
|
||||||
|
if all the required features are present. Set nut_have_ipv6=no
|
||||||
|
otherwise.
|
||||||
|
|
||||||
- Macro: NUT_PRINT_FEATURE_REPORT
|
- NUT_CHECK_OS
|
||||||
Print out a list of the features that have been reported by
|
|
||||||
previous NUT_REPORT_FEATURE macro calls.
|
|
||||||
|
|
||||||
- Macro: NUT_ARG_WITH(FEATURE, DESCRIPTION, DEFAULT)
|
Check for the exact system name and type.
|
||||||
Declare a simple --with-FEATURE option with the given DESCRIPTION
|
This was only used in the past to determine the packaging rule to be used
|
||||||
and DEFAULT. Sets the variable nut_with_FEATURE.
|
through the OS_NAME variable, but may be useful for other purposes in the
|
||||||
|
future.
|
||||||
|
|
||||||
|
- NUT_REPORT_FEATURE(FEATURE, VALUE)
|
||||||
|
|
||||||
|
Schedule a line for the end-of-configuration feature summary. The
|
||||||
|
FEATURE is a descriptive string such that the sentence "Checking
|
||||||
|
whether to FEATURE" makes sense, and VALUE describes the decision
|
||||||
|
taken (typically yes or no). The feature is also reported to the
|
||||||
|
terminal.
|
||||||
|
|
||||||
|
- NUT_REPORT(FEATURE, VALUE)
|
||||||
|
|
||||||
|
Schedule a line for the end-of-configuration feature summary, without
|
||||||
|
printing anything to the terminal immediately.
|
||||||
|
|
||||||
|
- NUT_PRINT_FEATURE_REPORT
|
||||||
|
|
||||||
|
Print out a list of the features that have been reported by
|
||||||
|
previous NUT_REPORT_FEATURE macro calls.
|
||||||
|
|
||||||
|
- NUT_ARG_WITH(FEATURE, DESCRIPTION, DEFAULT)
|
||||||
|
|
||||||
|
Declare a simple --with-FEATURE option with the given DESCRIPTION
|
||||||
|
and DEFAULT. Sets the variable nut_with_FEATURE.
|
||||||
|
|
452
docs/man/Makefile.am
Normal file
|
@ -0,0 +1,452 @@
|
||||||
|
# Network UPS Tools: man
|
||||||
|
#
|
||||||
|
|
||||||
|
# Notes:
|
||||||
|
# - sources (.txt) and groff formats are both distributed,
|
||||||
|
# - only sources are versioned ; groff files are generated at worst
|
||||||
|
# during 'make dist'
|
||||||
|
# - HTML files are built upon request, if AsciiDoc is available,
|
||||||
|
# - groff update will only happen if AsciiDoc is available too,
|
||||||
|
# - all this can probably (and hopefully) by improved, but I've not
|
||||||
|
# found a way to do pattern replacement on the fly for target deps!
|
||||||
|
# - Ref: http://www.gnu.org/software/hello/manual/automake/Man-pages.html
|
||||||
|
|
||||||
|
# Base configuration and client manpages, always installed
|
||||||
|
SRC_CONF_PAGES = \
|
||||||
|
nut.conf.txt \
|
||||||
|
ups.conf.txt \
|
||||||
|
upsd.conf.txt \
|
||||||
|
upsd.users.txt \
|
||||||
|
upsmon.conf.txt \
|
||||||
|
upssched.conf.txt
|
||||||
|
|
||||||
|
MAN_CONF_PAGES = \
|
||||||
|
nut.conf.5 \
|
||||||
|
ups.conf.5 \
|
||||||
|
upsd.conf.5 \
|
||||||
|
upsd.users.5 \
|
||||||
|
upsmon.conf.5 \
|
||||||
|
upssched.conf.5
|
||||||
|
|
||||||
|
man5_MANS = $(MAN_CONF_PAGES)
|
||||||
|
|
||||||
|
HTML_CONF_MANS = \
|
||||||
|
nut.conf.html \
|
||||||
|
ups.conf.html \
|
||||||
|
upsd.conf.html \
|
||||||
|
upsd.users.html \
|
||||||
|
upsmon.conf.html \
|
||||||
|
upssched.conf.html
|
||||||
|
|
||||||
|
SRC_CLIENT_PAGES = \
|
||||||
|
nutupsdrv.txt \
|
||||||
|
upsc.txt \
|
||||||
|
upscmd.txt \
|
||||||
|
upsd.txt \
|
||||||
|
upsdrvctl.txt \
|
||||||
|
upslog.txt \
|
||||||
|
upsmon.txt \
|
||||||
|
upsrw.txt \
|
||||||
|
upssched.txt
|
||||||
|
|
||||||
|
MAN_CLIENT_PAGES = \
|
||||||
|
nutupsdrv.8 \
|
||||||
|
upsc.8 \
|
||||||
|
upscmd.8 \
|
||||||
|
upsd.8 \
|
||||||
|
upsdrvctl.8 \
|
||||||
|
upslog.8 \
|
||||||
|
upsmon.8 \
|
||||||
|
upsrw.8 \
|
||||||
|
upssched.8
|
||||||
|
|
||||||
|
man8_MANS = $(MAN_CLIENT_PAGES)
|
||||||
|
|
||||||
|
HTML_CLIENT_MANS = \
|
||||||
|
nutupsdrv.html \
|
||||||
|
upsc.html \
|
||||||
|
upscmd.html \
|
||||||
|
upsd.html \
|
||||||
|
upsdrvctl.html \
|
||||||
|
upslog.html \
|
||||||
|
upsmon.html \
|
||||||
|
upsrw.html \
|
||||||
|
upssched.html
|
||||||
|
|
||||||
|
|
||||||
|
# CGI (--with-cgi) related manpages
|
||||||
|
SRC_CGI_PAGES = \
|
||||||
|
hosts.conf.txt \
|
||||||
|
upsset.conf.txt \
|
||||||
|
upsstats.html.txt \
|
||||||
|
upsset.cgi.txt \
|
||||||
|
upsstats.cgi.txt \
|
||||||
|
upsimage.cgi.txt
|
||||||
|
|
||||||
|
MAN5_CGI_PAGES = \
|
||||||
|
hosts.conf.5 \
|
||||||
|
upsset.conf.5 \
|
||||||
|
upsstats.html.5
|
||||||
|
|
||||||
|
MAN8_CGI_PAGES = \
|
||||||
|
upsset.cgi.8 \
|
||||||
|
upsstats.cgi.8 \
|
||||||
|
upsimage.cgi.8
|
||||||
|
|
||||||
|
if WITH_CGI
|
||||||
|
man5_MANS += $(MAN5_CGI_PAGES)
|
||||||
|
|
||||||
|
man8_MANS += $(MAN8_CGI_PAGES)
|
||||||
|
endif
|
||||||
|
|
||||||
|
HTML_CGI_MANS = \
|
||||||
|
hosts.conf.html \
|
||||||
|
upsset.conf.html \
|
||||||
|
upsstats.html.html \
|
||||||
|
upsset.cgi.html \
|
||||||
|
upsstats.cgi.html \
|
||||||
|
upsimage.cgi.html
|
||||||
|
|
||||||
|
|
||||||
|
# Development (--with-dev) related manpages
|
||||||
|
SRC_DEV_PAGES = \
|
||||||
|
upsclient.txt \
|
||||||
|
upscli_connect.txt \
|
||||||
|
upscli_disconnect.txt \
|
||||||
|
upscli_fd.txt \
|
||||||
|
upscli_get.txt \
|
||||||
|
upscli_list_next.txt \
|
||||||
|
upscli_list_start.txt \
|
||||||
|
upscli_readline.txt \
|
||||||
|
upscli_sendline.txt \
|
||||||
|
upscli_splitaddr.txt \
|
||||||
|
upscli_splitname.txt \
|
||||||
|
upscli_ssl.txt \
|
||||||
|
upscli_strerror.txt \
|
||||||
|
upscli_upserror.txt \
|
||||||
|
libupsclient-config.txt \
|
||||||
|
skel.txt
|
||||||
|
|
||||||
|
MAN3_DEV_PAGES = \
|
||||||
|
upsclient.3 \
|
||||||
|
upscli_connect.3 \
|
||||||
|
upscli_disconnect.3 \
|
||||||
|
upscli_fd.3 \
|
||||||
|
upscli_get.3 \
|
||||||
|
upscli_list_next.3 \
|
||||||
|
upscli_list_start.3 \
|
||||||
|
upscli_readline.3 \
|
||||||
|
upscli_sendline.3 \
|
||||||
|
upscli_splitaddr.3 \
|
||||||
|
upscli_splitname.3 \
|
||||||
|
upscli_ssl.3 \
|
||||||
|
upscli_strerror.3 \
|
||||||
|
upscli_upserror.3
|
||||||
|
|
||||||
|
MAN1_DEV_PAGES = \
|
||||||
|
libupsclient-config.1
|
||||||
|
|
||||||
|
if WITH_DEV
|
||||||
|
man3_MANS = $(MAN3_DEV_PAGES)
|
||||||
|
|
||||||
|
if !WITH_PKG_CONFIG
|
||||||
|
man1_MANS = $(MAN1_DEV_PAGES)
|
||||||
|
endif
|
||||||
|
# WITH_DEV
|
||||||
|
endif
|
||||||
|
|
||||||
|
HTML_DEV_MANS = \
|
||||||
|
upsclient.html \
|
||||||
|
upscli_connect.html \
|
||||||
|
upscli_disconnect.html \
|
||||||
|
upscli_fd.html \
|
||||||
|
upscli_get.html \
|
||||||
|
upscli_list_next.html \
|
||||||
|
upscli_list_start.html \
|
||||||
|
upscli_readline.html \
|
||||||
|
upscli_sendline.html \
|
||||||
|
upscli_splitaddr.html \
|
||||||
|
upscli_splitname.html \
|
||||||
|
upscli_ssl.html \
|
||||||
|
upscli_strerror.html \
|
||||||
|
upscli_upserror.html \
|
||||||
|
libupsclient-config.html \
|
||||||
|
skel.html
|
||||||
|
|
||||||
|
|
||||||
|
# Drivers related manpages
|
||||||
|
|
||||||
|
# (--with-drivers=...)
|
||||||
|
if SOME_DRIVERS
|
||||||
|
man8_MANS += $(DRIVER_MAN_LIST)
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
# (--with-serial)
|
||||||
|
SRC_SERIAL_PAGES = \
|
||||||
|
apcsmart.txt \
|
||||||
|
bcmxcp.txt \
|
||||||
|
belkin.txt \
|
||||||
|
belkinunv.txt \
|
||||||
|
bestfortress.txt \
|
||||||
|
bestuferrups.txt \
|
||||||
|
bestups.txt \
|
||||||
|
bestfcom.txt \
|
||||||
|
blazer.txt \
|
||||||
|
clone.txt \
|
||||||
|
dummy-ups.txt \
|
||||||
|
etapro.txt \
|
||||||
|
everups.txt \
|
||||||
|
gamatronic.txt \
|
||||||
|
genericups.txt \
|
||||||
|
isbmex.txt \
|
||||||
|
ivtscd.txt \
|
||||||
|
liebert.txt \
|
||||||
|
liebert-esp2.txt \
|
||||||
|
masterguard.txt \
|
||||||
|
metasys.txt \
|
||||||
|
mge-shut.txt \
|
||||||
|
mge-utalk.txt \
|
||||||
|
oneac.txt \
|
||||||
|
microdowell.txt \
|
||||||
|
optiups.txt \
|
||||||
|
powercom.txt \
|
||||||
|
powerpanel.txt \
|
||||||
|
rhino.txt \
|
||||||
|
safenet.txt \
|
||||||
|
solis.txt \
|
||||||
|
tripplite.txt \
|
||||||
|
tripplitesu.txt \
|
||||||
|
upscode2.txt \
|
||||||
|
victronups.txt
|
||||||
|
|
||||||
|
MAN_SERIAL_PAGES = \
|
||||||
|
apcsmart.8 \
|
||||||
|
bcmxcp.8 \
|
||||||
|
belkin.8 \
|
||||||
|
belkinunv.8 \
|
||||||
|
bestfortress.8 \
|
||||||
|
bestuferrups.8 \
|
||||||
|
bestups.8 \
|
||||||
|
bestfcom.8 \
|
||||||
|
blazer.8 \
|
||||||
|
clone.8 \
|
||||||
|
dummy-ups.8 \
|
||||||
|
etapro.8 \
|
||||||
|
everups.8 \
|
||||||
|
gamatronic.8 \
|
||||||
|
genericups.8 \
|
||||||
|
isbmex.8 \
|
||||||
|
ivtscd.8 \
|
||||||
|
liebert.8 \
|
||||||
|
liebert-esp2.8 \
|
||||||
|
masterguard.8 \
|
||||||
|
metasys.8 \
|
||||||
|
mge-shut.8 \
|
||||||
|
mge-utalk.8 \
|
||||||
|
oneac.8 \
|
||||||
|
microdowell.8 \
|
||||||
|
optiups.8 \
|
||||||
|
powercom.8 \
|
||||||
|
powerpanel.8 \
|
||||||
|
rhino.8 \
|
||||||
|
safenet.8 \
|
||||||
|
solis.8 \
|
||||||
|
tripplite.8 \
|
||||||
|
tripplitesu.8 \
|
||||||
|
upscode2.8 \
|
||||||
|
victronups.8
|
||||||
|
|
||||||
|
if WITH_SERIAL
|
||||||
|
man8_MANS += $(MAN_SERIAL_PAGES)
|
||||||
|
endif
|
||||||
|
|
||||||
|
HTML_SERIAL_MANS = \
|
||||||
|
apcsmart.html \
|
||||||
|
bcmxcp.html \
|
||||||
|
belkin.html \
|
||||||
|
belkinunv.html \
|
||||||
|
bestfortress.html \
|
||||||
|
bestuferrups.html \
|
||||||
|
bestups.html \
|
||||||
|
bestfcom.html \
|
||||||
|
blazer.html \
|
||||||
|
clone.html \
|
||||||
|
dummy-ups.html \
|
||||||
|
etapro.html \
|
||||||
|
everups.html \
|
||||||
|
gamatronic.html \
|
||||||
|
genericups.html \
|
||||||
|
isbmex.html \
|
||||||
|
ivtscd.html \
|
||||||
|
liebert.html \
|
||||||
|
liebert-esp2.html \
|
||||||
|
masterguard.html \
|
||||||
|
metasys.html \
|
||||||
|
mge-shut.html \
|
||||||
|
mge-utalk.html \
|
||||||
|
oneac.html \
|
||||||
|
microdowell.html \
|
||||||
|
optiups.html \
|
||||||
|
powercom.html \
|
||||||
|
powerpanel.html \
|
||||||
|
rhino.html \
|
||||||
|
safenet.html \
|
||||||
|
solis.html \
|
||||||
|
tripplite.html \
|
||||||
|
tripplitesu.html \
|
||||||
|
upscode2.html \
|
||||||
|
victronups.html
|
||||||
|
|
||||||
|
# (--with-snmp)
|
||||||
|
SRC_SNMP_PAGES = snmp-ups.txt
|
||||||
|
MAN_SNMP_PAGES = snmp-ups.8
|
||||||
|
|
||||||
|
if WITH_SNMP
|
||||||
|
man8_MANS += $(MAN_SNMP_PAGES)
|
||||||
|
endif
|
||||||
|
|
||||||
|
HTML_SNMP_MANS = snmp-ups.html
|
||||||
|
|
||||||
|
# (--with-usb)
|
||||||
|
SRC_USB_LIBUSB_PAGES = \
|
||||||
|
bcmxcp_usb.txt \
|
||||||
|
richcomm_usb.txt \
|
||||||
|
tripplite_usb.txt \
|
||||||
|
usbhid-ups.txt
|
||||||
|
|
||||||
|
MAN_USB_LIBUSB_PAGES = \
|
||||||
|
bcmxcp_usb.8 \
|
||||||
|
richcomm_usb.8 \
|
||||||
|
tripplite_usb.8 \
|
||||||
|
usbhid-ups.8
|
||||||
|
|
||||||
|
if WITH_USB
|
||||||
|
man8_MANS += $(MAN_USB_LIBUSB_PAGES)
|
||||||
|
endif
|
||||||
|
|
||||||
|
HTML_USB_LIBUSB_MANS = \
|
||||||
|
bcmxcp_usb.html \
|
||||||
|
richcomm_usb.html \
|
||||||
|
tripplite_usb.html \
|
||||||
|
usbhid-ups.html
|
||||||
|
|
||||||
|
# (--with-neon)
|
||||||
|
SRC_NETXML_PAGES = netxml-ups.txt
|
||||||
|
MAN_NETXML_PAGES = netxml-ups.8
|
||||||
|
|
||||||
|
if WITH_NEONXML
|
||||||
|
man8_MANS += $(MAN_NETXML_PAGES)
|
||||||
|
endif
|
||||||
|
|
||||||
|
HTML_NETXML_MANS = netxml-ups.html
|
||||||
|
|
||||||
|
# (--with-powerman)
|
||||||
|
SRC_POWERMAN_PAGES = powerman-pdu.txt
|
||||||
|
MAN_POWERMAN_PAGES = powerman-pdu.8
|
||||||
|
|
||||||
|
if WITH_LIBPOWERMAN
|
||||||
|
man8_MANS += $(MAN_POWERMAN_PAGES)
|
||||||
|
endif
|
||||||
|
|
||||||
|
HTML_POWERMAN_MANS = powerman-pdu.html
|
||||||
|
|
||||||
|
# SOME_DRIVERS
|
||||||
|
endif
|
||||||
|
|
||||||
|
MAN_MANS = \
|
||||||
|
$(MAN_CONF_PAGES) \
|
||||||
|
$(MAN_CLIENT_PAGES) \
|
||||||
|
$(MAN5_CGI_PAGES) \
|
||||||
|
$(MAN8_CGI_PAGES) \
|
||||||
|
$(MAN1_DEV_PAGES) \
|
||||||
|
$(MAN3_DEV_PAGES) \
|
||||||
|
$(MAN_SERIAL_PAGES) \
|
||||||
|
$(MAN_SNMP_PAGES) \
|
||||||
|
$(MAN_USB_LIBUSB_PAGES) \
|
||||||
|
$(MAN_NETXML_PAGES) \
|
||||||
|
$(MAN_POWERMAN_PAGES)
|
||||||
|
|
||||||
|
# distribute everything, even those not installed by default
|
||||||
|
# Note that 'dist' target requires AsciiDoc!
|
||||||
|
EXTRA_DIST = \
|
||||||
|
$(SRC_CONF_PAGES) \
|
||||||
|
$(SRC_CLIENT_PAGES) \
|
||||||
|
$(SRC_CGI_PAGES) \
|
||||||
|
$(SRC_DEV_PAGES) \
|
||||||
|
$(SRC_SERIAL_PAGES) \
|
||||||
|
$(SRC_SNMP_PAGES) \
|
||||||
|
$(SRC_USB_LIBUSB_PAGES) \
|
||||||
|
$(SRC_NETXML_PAGES) \
|
||||||
|
$(SRC_POWERMAN_PAGES) \
|
||||||
|
$(MAN_MANS) \
|
||||||
|
asciidoc.conf
|
||||||
|
|
||||||
|
HTML_MANS = \
|
||||||
|
$(HTML_CONF_MANS) \
|
||||||
|
$(HTML_CLIENT_MANS) \
|
||||||
|
$(HTML_CGI_MANS) \
|
||||||
|
$(HTML_DEV_MANS) \
|
||||||
|
$(HTML_SERIAL_MANS) \
|
||||||
|
$(HTML_SNMP_MANS) \
|
||||||
|
$(HTML_USB_LIBUSB_MANS) \
|
||||||
|
$(HTML_NETXML_MANS) \
|
||||||
|
$(HTML_POWERMAN_MANS)
|
||||||
|
|
||||||
|
all:
|
||||||
|
|
||||||
|
man-index.html: index.html
|
||||||
|
cp -f $< $@
|
||||||
|
|
||||||
|
html-man: $(HTML_MANS) man-index.html
|
||||||
|
|
||||||
|
CLEANFILES = *.xml *.html
|
||||||
|
|
||||||
|
SUFFIXES = .txt .html .1 .3 .5 .8
|
||||||
|
|
||||||
|
if HAVE_ASCIIDOC
|
||||||
|
|
||||||
|
.txt.html:
|
||||||
|
$(ASCIIDOC) --backend=xhtml11 \
|
||||||
|
--attribute localdate=`TZ=UTC date +%Y-%m-%d` \
|
||||||
|
--attribute localtime=`TZ=UTC date +%H:%M:%S` \
|
||||||
|
-o $@ $<
|
||||||
|
|
||||||
|
### The --destination-dir flag doesn't seem to affect the intermediate .xml file.
|
||||||
|
### Hence, the copying dance below.
|
||||||
|
A2X_MANPAGE_OPTS = -f manpage --attribute nutversion="@PACKAGE_VERSION@"
|
||||||
|
|
||||||
|
.txt.1:
|
||||||
|
test -f `basename $<` || cp -p $< .
|
||||||
|
$(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
|
||||||
|
|
||||||
|
.txt.3:
|
||||||
|
test -f `basename $<` || cp -p $< .
|
||||||
|
$(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
|
||||||
|
|
||||||
|
.txt.5:
|
||||||
|
test -f `basename $<` || cp -p $< .
|
||||||
|
$(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
|
||||||
|
|
||||||
|
.txt.8:
|
||||||
|
test -f `basename $<` || cp -p $< .
|
||||||
|
$(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
|
||||||
|
|
||||||
|
else !HAVE_ASCIIDOC
|
||||||
|
|
||||||
|
.txt.html:
|
||||||
|
@echo "Not (re)building $@ manual page, since 'asciidoc' was not found."
|
||||||
|
|
||||||
|
.txt.1:
|
||||||
|
@echo "Using existing $@ manual page, since 'asciidoc' was not found."
|
||||||
|
|
||||||
|
.txt.3:
|
||||||
|
@echo "Using existing $@ manual page, since 'asciidoc' was not found."
|
||||||
|
|
||||||
|
.txt.5:
|
||||||
|
@echo "Using existing $@ manual page, since 'asciidoc' was not found."
|
||||||
|
|
||||||
|
.txt.8:
|
||||||
|
@echo "Using existing $@ manual page, since 'asciidoc' was not found."
|
||||||
|
|
||||||
|
endif !HAVE_ASCIIDOC
|
|
@ -1,4 +1,4 @@
|
||||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
@ -16,6 +16,17 @@
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
# Network UPS Tools: man
|
# Network UPS Tools: man
|
||||||
|
#
|
||||||
|
|
||||||
|
# Notes:
|
||||||
|
# - sources (.txt) and groff formats are both distributed,
|
||||||
|
# - only sources are versioned ; groff files are generated at worst
|
||||||
|
# during 'make dist'
|
||||||
|
# - HTML files are built upon request, if AsciiDoc is available,
|
||||||
|
# - groff update will only happen if AsciiDoc is available too,
|
||||||
|
# - all this can probably (and hopefully) by improved, but I've not
|
||||||
|
# found a way to do pattern replacement on the fly for target deps!
|
||||||
|
# - Ref: http://www.gnu.org/software/hello/manual/automake/Man-pages.html
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
pkgincludedir = $(includedir)/@PACKAGE@
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
@ -36,24 +47,28 @@ POST_UNINSTALL = :
|
||||||
build_triplet = @build@
|
build_triplet = @build@
|
||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
target_triplet = @target@
|
target_triplet = @target@
|
||||||
@WITH_DEV_TRUE@@WITH_PKG_CONFIG_FALSE@am__append_1 = libupsclient-config.1
|
@WITH_CGI_TRUE@am__append_1 = $(MAN5_CGI_PAGES)
|
||||||
@WITH_CGI_TRUE@am__append_2 = $(CGI_PAGES)
|
@WITH_CGI_TRUE@am__append_2 = $(MAN8_CGI_PAGES)
|
||||||
@WITH_DEV_TRUE@am__append_3 = $(LIB_PAGES)
|
|
||||||
@SOME_DRIVERS_TRUE@am__append_4 = $(DRIVER_MAN_LIST)
|
# Drivers related manpages
|
||||||
@SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_5 = $(SERIAL_PAGES)
|
|
||||||
@SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_6 = $(SNMP_PAGES)
|
# (--with-drivers=...)
|
||||||
@SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_7 = $(USB_LIBUSB_PAGES)
|
@SOME_DRIVERS_TRUE@am__append_3 = $(DRIVER_MAN_LIST)
|
||||||
@SOME_DRIVERS_FALSE@@WITH_NEONXML_TRUE@am__append_8 = $(NETXML_PAGES)
|
@SOME_DRIVERS_FALSE@@WITH_SERIAL_TRUE@am__append_4 = $(MAN_SERIAL_PAGES)
|
||||||
@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_9 = $(POWERMAN_PAGES)
|
@SOME_DRIVERS_FALSE@@WITH_SNMP_TRUE@am__append_5 = $(MAN_SNMP_PAGES)
|
||||||
subdir = man
|
@SOME_DRIVERS_FALSE@@WITH_USB_TRUE@am__append_6 = $(MAN_USB_LIBUSB_PAGES)
|
||||||
|
@SOME_DRIVERS_FALSE@@WITH_NEONXML_TRUE@am__append_7 = $(MAN_NETXML_PAGES)
|
||||||
|
@SOME_DRIVERS_FALSE@@WITH_LIBPOWERMAN_TRUE@am__append_8 = $(MAN_POWERMAN_PAGES)
|
||||||
|
subdir = docs/man
|
||||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
|
||||||
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||||
$(top_srcdir)/m4/nut_arg_with.m4 \
|
$(top_srcdir)/m4/nut_arg_with.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_ipv6.m4 \
|
$(top_srcdir)/m4/nut_check_asciidoc.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
$(top_srcdir)/m4/nut_check_libgd.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
$(top_srcdir)/m4/nut_check_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
$(top_srcdir)/m4/nut_check_libneon.m4 \
|
||||||
|
@ -63,6 +78,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
$(top_srcdir)/m4/nut_check_libusb.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
$(top_srcdir)/m4/nut_check_libwrap.m4 \
|
||||||
$(top_srcdir)/m4/nut_check_os.m4 \
|
$(top_srcdir)/m4/nut_check_os.m4 \
|
||||||
|
$(top_srcdir)/m4/nut_config_libhal.m4 \
|
||||||
$(top_srcdir)/m4/nut_report_feature.m4 \
|
$(top_srcdir)/m4/nut_report_feature.m4 \
|
||||||
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
$(top_srcdir)/m4/nut_type_socklen_t.m4 \
|
||||||
$(top_srcdir)/configure.in
|
$(top_srcdir)/configure.in
|
||||||
|
@ -102,11 +118,13 @@ man3dir = $(mandir)/man3
|
||||||
man5dir = $(mandir)/man5
|
man5dir = $(mandir)/man5
|
||||||
man8dir = $(mandir)/man8
|
man8dir = $(mandir)/man8
|
||||||
NROFF = nroff
|
NROFF = nroff
|
||||||
MANS = $(man_MANS)
|
MANS = $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
A2X = @A2X@
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
AR = @AR@
|
AR = @AR@
|
||||||
|
ASCIIDOC = @ASCIIDOC@
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -119,8 +137,10 @@ CONFPATH = @CONFPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DBLATEX = @DBLATEX@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
DOC_BUILD_LIST = @DOC_BUILD_LIST@
|
||||||
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
|
||||||
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
|
||||||
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
|
||||||
|
@ -137,7 +157,6 @@ HAL_CALLOUTS_PATH = @HAL_CALLOUTS_PATH@
|
||||||
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
HAL_DEVICE_MATCH_KEY = @HAL_DEVICE_MATCH_KEY@
|
||||||
HAL_FDI_PATH = @HAL_FDI_PATH@
|
HAL_FDI_PATH = @HAL_FDI_PATH@
|
||||||
HAL_USER = @HAL_USER@
|
HAL_USER = @HAL_USER@
|
||||||
HAVE_GLIB_2_14 = @HAVE_GLIB_2_14@
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
@ -148,22 +167,22 @@ LDFLAGS = @LDFLAGS@
|
||||||
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
LIBGD_CFLAGS = @LIBGD_CFLAGS@
|
||||||
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
LIBGD_LDFLAGS = @LIBGD_LDFLAGS@
|
||||||
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
LIBHAL_CFLAGS = @LIBHAL_CFLAGS@
|
||||||
LIBHAL_LDFLAGS = @LIBHAL_LDFLAGS@
|
LIBHAL_LIBS = @LIBHAL_LIBS@
|
||||||
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
LIBNEON_CFLAGS = @LIBNEON_CFLAGS@
|
||||||
LIBNEON_LDFLAGS = @LIBNEON_LDFLAGS@
|
LIBNEON_LIBS = @LIBNEON_LIBS@
|
||||||
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
LIBNETSNMP_CFLAGS = @LIBNETSNMP_CFLAGS@
|
||||||
LIBNETSNMP_LDFLAGS = @LIBNETSNMP_LDFLAGS@
|
LIBNETSNMP_LIBS = @LIBNETSNMP_LIBS@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
LIBPOWERMAN_CFLAGS = @LIBPOWERMAN_CFLAGS@
|
||||||
LIBPOWERMAN_LDFLAGS = @LIBPOWERMAN_LDFLAGS@
|
LIBPOWERMAN_LIBS = @LIBPOWERMAN_LIBS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
LIBSSL_CFLAGS = @LIBSSL_CFLAGS@
|
||||||
LIBSSL_LDFLAGS = @LIBSSL_LDFLAGS@
|
LIBSSL_LIBS = @LIBSSL_LIBS@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
LIBUSB_CFLAGS = @LIBUSB_CFLAGS@
|
||||||
LIBUSB_LDFLAGS = @LIBUSB_LDFLAGS@
|
LIBUSB_LIBS = @LIBUSB_LIBS@
|
||||||
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
LIBWRAP_CFLAGS = @LIBWRAP_CFLAGS@
|
||||||
LIBWRAP_LDFLAGS = @LIBWRAP_LDFLAGS@
|
LIBWRAP_LIBS = @LIBWRAP_LIBS@
|
||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
@ -259,77 +278,357 @@ top_build_prefix = @top_build_prefix@
|
||||||
top_builddir = @top_builddir@
|
top_builddir = @top_builddir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
udevdir = @udevdir@
|
udevdir = @udevdir@
|
||||||
LIB_PAGES = upsclient.3 upscli_connect.3 upscli_disconnect.3 \
|
|
||||||
upscli_readline.3 upscli_sendline.3 upscli_splitaddr.3 \
|
|
||||||
upscli_splitname.3 upscli_strerror.3 upscli_fd.3 upscli_get.3 \
|
|
||||||
upscli_list_next.3 upscli_list_start.3 upscli_ssl.3 \
|
|
||||||
upscli_upserror.3 $(am__append_1)
|
|
||||||
CONF_PAGES = nut.conf.5 ups.conf.5 upssched.conf.5 upsd.conf.5 \
|
|
||||||
upsmon.conf.5 upsd.users.5
|
|
||||||
|
|
||||||
CLIENT_PAGES = upsc.8 upsrw.8 upscmd.8 upslog.8 upssched.8 \
|
# Base configuration and client manpages, always installed
|
||||||
upsmon.8 upsd.8 nutupsdrv.8 upsdrvctl.8
|
SRC_CONF_PAGES = \
|
||||||
|
nut.conf.txt \
|
||||||
|
ups.conf.txt \
|
||||||
|
upsd.conf.txt \
|
||||||
|
upsd.users.txt \
|
||||||
|
upsmon.conf.txt \
|
||||||
|
upssched.conf.txt
|
||||||
|
|
||||||
CGI_PAGES = hosts.conf.5 upsset.conf.5 upsstats.html.5 \
|
MAN_CONF_PAGES = \
|
||||||
upsset.cgi.8 upsstats.cgi.8 upsimage.cgi.8
|
nut.conf.5 \
|
||||||
|
ups.conf.5 \
|
||||||
|
upsd.conf.5 \
|
||||||
|
upsd.users.5 \
|
||||||
|
upsmon.conf.5 \
|
||||||
|
upssched.conf.5
|
||||||
|
|
||||||
SERIAL_PAGES = \
|
man5_MANS = $(MAN_CONF_PAGES) $(am__append_1)
|
||||||
apcsmart.8 \
|
HTML_CONF_MANS = \
|
||||||
bcmxcp.8 \
|
nut.conf.html \
|
||||||
belkin.8 \
|
ups.conf.html \
|
||||||
belkinunv.8 \
|
upsd.conf.html \
|
||||||
bestfortress.8 \
|
upsd.users.html \
|
||||||
bestuferrups.8 \
|
upsmon.conf.html \
|
||||||
bestups.8 \
|
upssched.conf.html
|
||||||
bestfcom.8 \
|
|
||||||
blazer.8 \
|
|
||||||
dummy-ups.8 \
|
|
||||||
etapro.8 \
|
|
||||||
everups.8 \
|
|
||||||
gamatronic.8 \
|
|
||||||
genericups.8 \
|
|
||||||
isbmex.8 \
|
|
||||||
ivtscd.8 \
|
|
||||||
liebert.8 \
|
|
||||||
liebertgxt2.8 \
|
|
||||||
masterguard.8 \
|
|
||||||
metasys.8 \
|
|
||||||
mge-shut.8 \
|
|
||||||
mge-utalk.8 \
|
|
||||||
oneac.8 \
|
|
||||||
microdowell.8 \
|
|
||||||
optiups.8 \
|
|
||||||
powercom.8 \
|
|
||||||
powerpanel.8 \
|
|
||||||
megatec.8 \
|
|
||||||
rhino.8 \
|
|
||||||
safenet.8 \
|
|
||||||
solis.8 \
|
|
||||||
tripplite.8 \
|
|
||||||
tripplitesu.8 \
|
|
||||||
upscode2.8 \
|
|
||||||
victronups.8 \
|
|
||||||
clone.8
|
|
||||||
|
|
||||||
SNMP_PAGES = snmp-ups.8
|
SRC_CLIENT_PAGES = \
|
||||||
USB_LIBUSB_PAGES = usbhid-ups.8 bcmxcp_usb.8 tripplite_usb.8 megatec_usb.8 richcomm_usb.8
|
nutupsdrv.txt \
|
||||||
NETXML_PAGES = netxml-ups.8
|
upsc.txt \
|
||||||
POWERMAN_PAGES = powerman-pdu.8
|
upscmd.txt \
|
||||||
|
upsd.txt \
|
||||||
|
upsdrvctl.txt \
|
||||||
|
upslog.txt \
|
||||||
|
upsmon.txt \
|
||||||
|
upsrw.txt \
|
||||||
|
upssched.txt
|
||||||
|
|
||||||
# decide which pages to install
|
MAN_CLIENT_PAGES = \
|
||||||
man_MANS = $(CONF_PAGES) $(CLIENT_PAGES) $(am__append_2) \
|
nutupsdrv.8 \
|
||||||
$(am__append_3) $(am__append_4) $(am__append_5) \
|
upsc.8 \
|
||||||
$(am__append_6) $(am__append_7) $(am__append_8) \
|
upscmd.8 \
|
||||||
$(am__append_9)
|
upsd.8 \
|
||||||
|
upsdrvctl.8 \
|
||||||
|
upslog.8 \
|
||||||
|
upsmon.8 \
|
||||||
|
upsrw.8 \
|
||||||
|
upssched.8
|
||||||
|
|
||||||
# distribute everything, even that which is not installed by default
|
man8_MANS = $(MAN_CLIENT_PAGES) $(am__append_2) $(am__append_3) \
|
||||||
EXTRA_DIST = $(LIB_PAGES) $(CONF_PAGES) $(CLIENT_PAGES) \
|
$(am__append_4) $(am__append_5) $(am__append_6) \
|
||||||
$(CGI_PAGES) $(SERIAL_PAGES) $(SNMP_PAGES) $(USB_LIBUSB_PAGES) \
|
$(am__append_7) $(am__append_8)
|
||||||
$(NETXML_PAGES) $(POWERMAN_PAGES) libupsclient-config.1 skel.8
|
HTML_CLIENT_MANS = \
|
||||||
|
nutupsdrv.html \
|
||||||
|
upsc.html \
|
||||||
|
upscmd.html \
|
||||||
|
upsd.html \
|
||||||
|
upsdrvctl.html \
|
||||||
|
upslog.html \
|
||||||
|
upsmon.html \
|
||||||
|
upsrw.html \
|
||||||
|
upssched.html
|
||||||
|
|
||||||
|
|
||||||
|
# CGI (--with-cgi) related manpages
|
||||||
|
SRC_CGI_PAGES = \
|
||||||
|
hosts.conf.txt \
|
||||||
|
upsset.conf.txt \
|
||||||
|
upsstats.html.txt \
|
||||||
|
upsset.cgi.txt \
|
||||||
|
upsstats.cgi.txt \
|
||||||
|
upsimage.cgi.txt
|
||||||
|
|
||||||
|
MAN5_CGI_PAGES = \
|
||||||
|
hosts.conf.5 \
|
||||||
|
upsset.conf.5 \
|
||||||
|
upsstats.html.5
|
||||||
|
|
||||||
|
MAN8_CGI_PAGES = \
|
||||||
|
upsset.cgi.8 \
|
||||||
|
upsstats.cgi.8 \
|
||||||
|
upsimage.cgi.8
|
||||||
|
|
||||||
|
HTML_CGI_MANS = \
|
||||||
|
hosts.conf.html \
|
||||||
|
upsset.conf.html \
|
||||||
|
upsstats.html.html \
|
||||||
|
upsset.cgi.html \
|
||||||
|
upsstats.cgi.html \
|
||||||
|
upsimage.cgi.html
|
||||||
|
|
||||||
|
|
||||||
|
# Development (--with-dev) related manpages
|
||||||
|
SRC_DEV_PAGES = \
|
||||||
|
upsclient.txt \
|
||||||
|
upscli_connect.txt \
|
||||||
|
upscli_disconnect.txt \
|
||||||
|
upscli_fd.txt \
|
||||||
|
upscli_get.txt \
|
||||||
|
upscli_list_next.txt \
|
||||||
|
upscli_list_start.txt \
|
||||||
|
upscli_readline.txt \
|
||||||
|
upscli_sendline.txt \
|
||||||
|
upscli_splitaddr.txt \
|
||||||
|
upscli_splitname.txt \
|
||||||
|
upscli_ssl.txt \
|
||||||
|
upscli_strerror.txt \
|
||||||
|
upscli_upserror.txt \
|
||||||
|
libupsclient-config.txt \
|
||||||
|
skel.txt
|
||||||
|
|
||||||
|
MAN3_DEV_PAGES = \
|
||||||
|
upsclient.3 \
|
||||||
|
upscli_connect.3 \
|
||||||
|
upscli_disconnect.3 \
|
||||||
|
upscli_fd.3 \
|
||||||
|
upscli_get.3 \
|
||||||
|
upscli_list_next.3 \
|
||||||
|
upscli_list_start.3 \
|
||||||
|
upscli_readline.3 \
|
||||||
|
upscli_sendline.3 \
|
||||||
|
upscli_splitaddr.3 \
|
||||||
|
upscli_splitname.3 \
|
||||||
|
upscli_ssl.3 \
|
||||||
|
upscli_strerror.3 \
|
||||||
|
upscli_upserror.3
|
||||||
|
|
||||||
|
MAN1_DEV_PAGES = \
|
||||||
|
libupsclient-config.1
|
||||||
|
|
||||||
|
@WITH_DEV_TRUE@man3_MANS = $(MAN3_DEV_PAGES)
|
||||||
|
@WITH_DEV_TRUE@@WITH_PKG_CONFIG_FALSE@man1_MANS = $(MAN1_DEV_PAGES)
|
||||||
|
# WITH_DEV
|
||||||
|
HTML_DEV_MANS = \
|
||||||
|
upsclient.html \
|
||||||
|
upscli_connect.html \
|
||||||
|
upscli_disconnect.html \
|
||||||
|
upscli_fd.html \
|
||||||
|
upscli_get.html \
|
||||||
|
upscli_list_next.html \
|
||||||
|
upscli_list_start.html \
|
||||||
|
upscli_readline.html \
|
||||||
|
upscli_sendline.html \
|
||||||
|
upscli_splitaddr.html \
|
||||||
|
upscli_splitname.html \
|
||||||
|
upscli_ssl.html \
|
||||||
|
upscli_strerror.html \
|
||||||
|
upscli_upserror.html \
|
||||||
|
libupsclient-config.html \
|
||||||
|
skel.html
|
||||||
|
|
||||||
|
|
||||||
|
# (--with-serial)
|
||||||
|
@SOME_DRIVERS_FALSE@SRC_SERIAL_PAGES = \
|
||||||
|
@SOME_DRIVERS_FALSE@ apcsmart.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ bcmxcp.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ belkin.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ belkinunv.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ bestfortress.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ bestuferrups.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ bestups.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ bestfcom.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ blazer.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ clone.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ dummy-ups.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ etapro.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ everups.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ gamatronic.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ genericups.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ isbmex.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ ivtscd.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ liebert.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ liebert-esp2.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ masterguard.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ metasys.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ mge-shut.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ mge-utalk.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ oneac.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ microdowell.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ optiups.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ powercom.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ powerpanel.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ rhino.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ safenet.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ solis.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ tripplite.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ tripplitesu.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ upscode2.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ victronups.txt
|
||||||
|
|
||||||
|
@SOME_DRIVERS_FALSE@MAN_SERIAL_PAGES = \
|
||||||
|
@SOME_DRIVERS_FALSE@ apcsmart.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ bcmxcp.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ belkin.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ belkinunv.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ bestfortress.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ bestuferrups.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ bestups.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ bestfcom.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ blazer.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ clone.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ dummy-ups.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ etapro.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ everups.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ gamatronic.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ genericups.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ isbmex.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ ivtscd.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ liebert.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ liebert-esp2.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ masterguard.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ metasys.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ mge-shut.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ mge-utalk.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ oneac.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ microdowell.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ optiups.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ powercom.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ powerpanel.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ rhino.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ safenet.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ solis.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ tripplite.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ tripplitesu.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ upscode2.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ victronups.8
|
||||||
|
|
||||||
|
@SOME_DRIVERS_FALSE@HTML_SERIAL_MANS = \
|
||||||
|
@SOME_DRIVERS_FALSE@ apcsmart.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ bcmxcp.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ belkin.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ belkinunv.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ bestfortress.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ bestuferrups.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ bestups.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ bestfcom.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ blazer.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ clone.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ dummy-ups.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ etapro.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ everups.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ gamatronic.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ genericups.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ isbmex.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ ivtscd.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ liebert.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ liebert-esp2.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ masterguard.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ metasys.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ mge-shut.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ mge-utalk.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ oneac.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ microdowell.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ optiups.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ powercom.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ powerpanel.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ rhino.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ safenet.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ solis.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ tripplite.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ tripplitesu.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ upscode2.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ victronups.html
|
||||||
|
|
||||||
|
|
||||||
|
# (--with-snmp)
|
||||||
|
@SOME_DRIVERS_FALSE@SRC_SNMP_PAGES = snmp-ups.txt
|
||||||
|
@SOME_DRIVERS_FALSE@MAN_SNMP_PAGES = snmp-ups.8
|
||||||
|
@SOME_DRIVERS_FALSE@HTML_SNMP_MANS = snmp-ups.html
|
||||||
|
|
||||||
|
# (--with-usb)
|
||||||
|
@SOME_DRIVERS_FALSE@SRC_USB_LIBUSB_PAGES = \
|
||||||
|
@SOME_DRIVERS_FALSE@ bcmxcp_usb.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ richcomm_usb.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ tripplite_usb.txt \
|
||||||
|
@SOME_DRIVERS_FALSE@ usbhid-ups.txt
|
||||||
|
|
||||||
|
@SOME_DRIVERS_FALSE@MAN_USB_LIBUSB_PAGES = \
|
||||||
|
@SOME_DRIVERS_FALSE@ bcmxcp_usb.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ richcomm_usb.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ tripplite_usb.8 \
|
||||||
|
@SOME_DRIVERS_FALSE@ usbhid-ups.8
|
||||||
|
|
||||||
|
@SOME_DRIVERS_FALSE@HTML_USB_LIBUSB_MANS = \
|
||||||
|
@SOME_DRIVERS_FALSE@ bcmxcp_usb.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ richcomm_usb.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ tripplite_usb.html \
|
||||||
|
@SOME_DRIVERS_FALSE@ usbhid-ups.html
|
||||||
|
|
||||||
|
|
||||||
|
# (--with-neon)
|
||||||
|
@SOME_DRIVERS_FALSE@SRC_NETXML_PAGES = netxml-ups.txt
|
||||||
|
@SOME_DRIVERS_FALSE@MAN_NETXML_PAGES = netxml-ups.8
|
||||||
|
@SOME_DRIVERS_FALSE@HTML_NETXML_MANS = netxml-ups.html
|
||||||
|
|
||||||
|
# (--with-powerman)
|
||||||
|
@SOME_DRIVERS_FALSE@SRC_POWERMAN_PAGES = powerman-pdu.txt
|
||||||
|
@SOME_DRIVERS_FALSE@MAN_POWERMAN_PAGES = powerman-pdu.8
|
||||||
|
@SOME_DRIVERS_FALSE@HTML_POWERMAN_MANS = powerman-pdu.html
|
||||||
|
|
||||||
|
# SOME_DRIVERS
|
||||||
|
MAN_MANS = \
|
||||||
|
$(MAN_CONF_PAGES) \
|
||||||
|
$(MAN_CLIENT_PAGES) \
|
||||||
|
$(MAN5_CGI_PAGES) \
|
||||||
|
$(MAN8_CGI_PAGES) \
|
||||||
|
$(MAN1_DEV_PAGES) \
|
||||||
|
$(MAN3_DEV_PAGES) \
|
||||||
|
$(MAN_SERIAL_PAGES) \
|
||||||
|
$(MAN_SNMP_PAGES) \
|
||||||
|
$(MAN_USB_LIBUSB_PAGES) \
|
||||||
|
$(MAN_NETXML_PAGES) \
|
||||||
|
$(MAN_POWERMAN_PAGES)
|
||||||
|
|
||||||
|
|
||||||
|
# distribute everything, even those not installed by default
|
||||||
|
# Note that 'dist' target requires AsciiDoc!
|
||||||
|
EXTRA_DIST = \
|
||||||
|
$(SRC_CONF_PAGES) \
|
||||||
|
$(SRC_CLIENT_PAGES) \
|
||||||
|
$(SRC_CGI_PAGES) \
|
||||||
|
$(SRC_DEV_PAGES) \
|
||||||
|
$(SRC_SERIAL_PAGES) \
|
||||||
|
$(SRC_SNMP_PAGES) \
|
||||||
|
$(SRC_USB_LIBUSB_PAGES) \
|
||||||
|
$(SRC_NETXML_PAGES) \
|
||||||
|
$(SRC_POWERMAN_PAGES) \
|
||||||
|
$(MAN_MANS) \
|
||||||
|
asciidoc.conf
|
||||||
|
|
||||||
|
HTML_MANS = \
|
||||||
|
$(HTML_CONF_MANS) \
|
||||||
|
$(HTML_CLIENT_MANS) \
|
||||||
|
$(HTML_CGI_MANS) \
|
||||||
|
$(HTML_DEV_MANS) \
|
||||||
|
$(HTML_SERIAL_MANS) \
|
||||||
|
$(HTML_SNMP_MANS) \
|
||||||
|
$(HTML_USB_LIBUSB_MANS) \
|
||||||
|
$(HTML_NETXML_MANS) \
|
||||||
|
$(HTML_POWERMAN_MANS)
|
||||||
|
|
||||||
|
CLEANFILES = *.xml *.html
|
||||||
|
SUFFIXES = .txt .html .1 .3 .5 .8
|
||||||
|
|
||||||
|
### The --destination-dir flag doesn't seem to affect the intermediate .xml file.
|
||||||
|
### Hence, the copying dance below.
|
||||||
|
@HAVE_ASCIIDOC_TRUE@A2X_MANPAGE_OPTS = -f manpage --attribute nutversion="@PACKAGE_VERSION@"
|
||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .txt .html .1 .3 .5 .8
|
||||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
@for dep in $?; do \
|
@for dep in $?; do \
|
||||||
case '$(am__configure_deps)' in \
|
case '$(am__configure_deps)' in \
|
||||||
|
@ -339,9 +638,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
|
||||||
exit 1;; \
|
exit 1;; \
|
||||||
esac; \
|
esac; \
|
||||||
done; \
|
done; \
|
||||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/man/Makefile'; \
|
||||||
$(am__cd) $(top_srcdir) && \
|
$(am__cd) $(top_srcdir) && \
|
||||||
$(AUTOMAKE) --gnu man/Makefile
|
$(AUTOMAKE) --gnu docs/man/Makefile
|
||||||
.PRECIOUS: Makefile
|
.PRECIOUS: Makefile
|
||||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
@case '$?' in \
|
@case '$?' in \
|
||||||
|
@ -366,13 +665,11 @@ mostlyclean-libtool:
|
||||||
|
|
||||||
clean-libtool:
|
clean-libtool:
|
||||||
-rm -rf .libs _libs
|
-rm -rf .libs _libs
|
||||||
install-man1: $(man_MANS)
|
install-man1: $(man1_MANS)
|
||||||
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
||||||
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
|
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
|
||||||
@list=''; test -n "$(man1dir)" || exit 0; \
|
@list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
|
||||||
{ for i in $$list; do echo "$$i"; done; \
|
{ for i in $$list; do echo "$$i"; done; \
|
||||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
|
||||||
sed -n '/\.1[a-z]*$$/p'; \
|
|
||||||
} | while read p; do \
|
} | while read p; do \
|
||||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||||
echo "$$d$$p"; echo "$$p"; \
|
echo "$$d$$p"; echo "$$p"; \
|
||||||
|
@ -395,22 +692,18 @@ install-man1: $(man_MANS)
|
||||||
|
|
||||||
uninstall-man1:
|
uninstall-man1:
|
||||||
@$(NORMAL_UNINSTALL)
|
@$(NORMAL_UNINSTALL)
|
||||||
@list=''; test -n "$(man1dir)" || exit 0; \
|
@list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
|
||||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
|
||||||
sed -n '/\.1[a-z]*$$/p'; \
|
|
||||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||||
test -z "$$files" || { \
|
test -z "$$files" || { \
|
||||||
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
|
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
|
||||||
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
|
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
|
||||||
install-man3: $(man_MANS)
|
install-man3: $(man3_MANS)
|
||||||
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
||||||
test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
|
test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
|
||||||
@list=''; test -n "$(man3dir)" || exit 0; \
|
@list='$(man3_MANS)'; test -n "$(man3dir)" || exit 0; \
|
||||||
{ for i in $$list; do echo "$$i"; done; \
|
{ for i in $$list; do echo "$$i"; done; \
|
||||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
|
||||||
sed -n '/\.3[a-z]*$$/p'; \
|
|
||||||
} | while read p; do \
|
} | while read p; do \
|
||||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||||
echo "$$d$$p"; echo "$$p"; \
|
echo "$$d$$p"; echo "$$p"; \
|
||||||
|
@ -433,22 +726,18 @@ install-man3: $(man_MANS)
|
||||||
|
|
||||||
uninstall-man3:
|
uninstall-man3:
|
||||||
@$(NORMAL_UNINSTALL)
|
@$(NORMAL_UNINSTALL)
|
||||||
@list=''; test -n "$(man3dir)" || exit 0; \
|
@list='$(man3_MANS)'; test -n "$(man3dir)" || exit 0; \
|
||||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
|
||||||
sed -n '/\.3[a-z]*$$/p'; \
|
|
||||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||||
test -z "$$files" || { \
|
test -z "$$files" || { \
|
||||||
echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
|
echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
|
||||||
cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
|
cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
|
||||||
install-man5: $(man_MANS)
|
install-man5: $(man5_MANS)
|
||||||
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
||||||
test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
|
test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
|
||||||
@list=''; test -n "$(man5dir)" || exit 0; \
|
@list='$(man5_MANS)'; test -n "$(man5dir)" || exit 0; \
|
||||||
{ for i in $$list; do echo "$$i"; done; \
|
{ for i in $$list; do echo "$$i"; done; \
|
||||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
|
||||||
sed -n '/\.5[a-z]*$$/p'; \
|
|
||||||
} | while read p; do \
|
} | while read p; do \
|
||||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||||
echo "$$d$$p"; echo "$$p"; \
|
echo "$$d$$p"; echo "$$p"; \
|
||||||
|
@ -471,22 +760,18 @@ install-man5: $(man_MANS)
|
||||||
|
|
||||||
uninstall-man5:
|
uninstall-man5:
|
||||||
@$(NORMAL_UNINSTALL)
|
@$(NORMAL_UNINSTALL)
|
||||||
@list=''; test -n "$(man5dir)" || exit 0; \
|
@list='$(man5_MANS)'; test -n "$(man5dir)" || exit 0; \
|
||||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
|
||||||
sed -n '/\.5[a-z]*$$/p'; \
|
|
||||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
|
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
|
||||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||||
test -z "$$files" || { \
|
test -z "$$files" || { \
|
||||||
echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
|
echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
|
||||||
cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
|
cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
|
||||||
install-man8: $(man_MANS)
|
install-man8: $(man8_MANS)
|
||||||
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
||||||
test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
|
test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
|
||||||
@list=''; test -n "$(man8dir)" || exit 0; \
|
@list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
|
||||||
{ for i in $$list; do echo "$$i"; done; \
|
{ for i in $$list; do echo "$$i"; done; \
|
||||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
|
||||||
sed -n '/\.8[a-z]*$$/p'; \
|
|
||||||
} | while read p; do \
|
} | while read p; do \
|
||||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||||
echo "$$d$$p"; echo "$$p"; \
|
echo "$$d$$p"; echo "$$p"; \
|
||||||
|
@ -509,10 +794,8 @@ install-man8: $(man_MANS)
|
||||||
|
|
||||||
uninstall-man8:
|
uninstall-man8:
|
||||||
@$(NORMAL_UNINSTALL)
|
@$(NORMAL_UNINSTALL)
|
||||||
@list=''; test -n "$(man8dir)" || exit 0; \
|
@list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
|
||||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
|
||||||
sed -n '/\.8[a-z]*$$/p'; \
|
|
||||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
|
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
|
||||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||||
test -z "$$files" || { \
|
test -z "$$files" || { \
|
||||||
|
@ -592,6 +875,7 @@ install-strip:
|
||||||
mostlyclean-generic:
|
mostlyclean-generic:
|
||||||
|
|
||||||
clean-generic:
|
clean-generic:
|
||||||
|
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||||
|
|
||||||
distclean-generic:
|
distclean-generic:
|
||||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
@ -686,6 +970,50 @@ uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \
|
||||||
uninstall-man8
|
uninstall-man8
|
||||||
|
|
||||||
|
|
||||||
|
all:
|
||||||
|
|
||||||
|
man-index.html: index.html
|
||||||
|
cp -f $< $@
|
||||||
|
|
||||||
|
html-man: $(HTML_MANS) man-index.html
|
||||||
|
|
||||||
|
@HAVE_ASCIIDOC_TRUE@.txt.html:
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ $(ASCIIDOC) --backend=xhtml11 \
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ --attribute localdate=`TZ=UTC date +%Y-%m-%d` \
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ --attribute localtime=`TZ=UTC date +%H:%M:%S` \
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ -o $@ $<
|
||||||
|
|
||||||
|
@HAVE_ASCIIDOC_TRUE@.txt.1:
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< .
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
|
||||||
|
|
||||||
|
@HAVE_ASCIIDOC_TRUE@.txt.3:
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< .
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
|
||||||
|
|
||||||
|
@HAVE_ASCIIDOC_TRUE@.txt.5:
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< .
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
|
||||||
|
|
||||||
|
@HAVE_ASCIIDOC_TRUE@.txt.8:
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< .
|
||||||
|
@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
|
||||||
|
|
||||||
|
@HAVE_ASCIIDOC_FALSE@.txt.html:
|
||||||
|
@HAVE_ASCIIDOC_FALSE@ @echo "Not (re)building $@ manual page, since 'asciidoc' was not found."
|
||||||
|
|
||||||
|
@HAVE_ASCIIDOC_FALSE@.txt.1:
|
||||||
|
@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found."
|
||||||
|
|
||||||
|
@HAVE_ASCIIDOC_FALSE@.txt.3:
|
||||||
|
@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found."
|
||||||
|
|
||||||
|
@HAVE_ASCIIDOC_FALSE@.txt.5:
|
||||||
|
@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found."
|
||||||
|
|
||||||
|
@HAVE_ASCIIDOC_FALSE@.txt.8:
|
||||||
|
@HAVE_ASCIIDOC_FALSE@ @echo "Using existing $@ manual page, since 'asciidoc' was not found."
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
.NOEXPORT:
|
.NOEXPORT:
|
124
docs/man/apcsmart.8
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
'\" t
|
||||||
|
.\" Title: apcsmart
|
||||||
|
.\" Author: [see the "AUTHOR" section]
|
||||||
|
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
|
||||||
|
.\" Date: 12/24/2010
|
||||||
|
.\" Manual: NUT Manual
|
||||||
|
.\" Source: Network UPS Tools
|
||||||
|
.\" Language: English
|
||||||
|
.\"
|
||||||
|
.TH "APCSMART" "8" "12/24/2010" "Network UPS Tools" "NUT Manual"
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * Define some portability stuff
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.\" http://bugs.debian.org/507673
|
||||||
|
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||||
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
.ie \n(.g .ds Aq \(aq
|
||||||
|
.el .ds Aq '
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * set default formatting
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" disable hyphenation
|
||||||
|
.nh
|
||||||
|
.\" disable justification (adjust text to left margin only)
|
||||||
|
.ad l
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.\" * MAIN CONTENT STARTS HERE *
|
||||||
|
.\" -----------------------------------------------------------------
|
||||||
|
.SH "NAME"
|
||||||
|
apcsmart \- Driver for American Power Conversion Smart Protocol UPS equipment
|
||||||
|
.SH "SYNOPSIS"
|
||||||
|
.sp
|
||||||
|
\fBapcsmart\fR \-h
|
||||||
|
.sp
|
||||||
|
\fBapcsmart\fR \-a \fIUPS_NAME\fR [\fIOPTIONS\fR]
|
||||||
|
.if n \{\
|
||||||
|
.sp
|
||||||
|
.\}
|
||||||
|
.RS 4
|
||||||
|
.it 1 an-trap
|
||||||
|
.nr an-no-space-flag 1
|
||||||
|
.nr an-break-flag 1
|
||||||
|
.br
|
||||||
|
.ps +1
|
||||||
|
\fBNote\fR
|
||||||
|
.ps -1
|
||||||
|
.br
|
||||||
|
.sp
|
||||||
|
This man page only documents the hardware\-specific features of the apcsmart driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&.
|
||||||
|
.sp .5v
|
||||||
|
.RE
|
||||||
|
.SH "SUPPORTED HARDWARE"
|
||||||
|
.sp
|
||||||
|
apcsmart should recognize all recent APC models that use a serial protocol at 2400 bps\&. This is primarily the Smart\-UPS, Matrix\-UPS and Back\-UPS Pro lines\&.
|
||||||
|
.sp
|
||||||
|
The driver attempts to support every bell and whistle of the APC reporting interface, whether or not this is strictly sensible\&.
|
||||||
|
.sp
|
||||||
|
Some older hardware may only report a handful of variables\&. This is usually not a bug\(emthey just don\(cqt support anything else\&.
|
||||||
|
.SH "CABLING"
|
||||||
|
.sp
|
||||||
|
This driver expects to see a 940\-0024C cable or a clone by default\&. You can switch to the 940\-0095B dual\-mode cable support with the cable= definition described below\&.
|
||||||
|
.sp
|
||||||
|
If your 940\-0024C cable is broken or missing, use this diagram to build a clone:
|
||||||
|
.sp
|
||||||
|
http://www\&.networkupstools\&.org/cables/940\-0024C\&.jpg
|
||||||
|
.SH "EXTRA ARGUMENTS"
|
||||||
|
.sp
|
||||||
|
This driver supports the following optional settings in the \fBups.conf\fR(5):
|
||||||
|
.PP
|
||||||
|
\fBcable=940\-0095B\fR
|
||||||
|
.RS 4
|
||||||
|
Configure the serial port for the APC 940\-0095B dual\-mode cable\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
\fBsdtype=\fR\fInum\fR
|
||||||
|
.RS 4
|
||||||
|
Use shutdown type
|
||||||
|
\fInum\fR, according to this table:
|
||||||
|
.PP
|
||||||
|
0
|
||||||
|
.RS 4
|
||||||
|
soft shutdown or powerdown, depending on battery status
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
1
|
||||||
|
.RS 4
|
||||||
|
soft shutdown followed by powerdown
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
2
|
||||||
|
.RS 4
|
||||||
|
instant power off
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
3
|
||||||
|
.RS 4
|
||||||
|
power off with grace period
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
4
|
||||||
|
.RS 4
|
||||||
|
"force OB" hack method for CS 350
|
||||||
|
.RE
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
|
Modes 0 and 1 will power up the load when power returns\&. Modes 2 and 3 will keep the load turned off when the power returns\&.
|
||||||
|
.sp
|
||||||
|
Mode 4 exploits an oddity in the CS 350 models since they only seem to support the S command, but then only when running on battery\&. As a result, the driver will force the UPS to go on battery if necessary before sending the shutdown command\&. This ensures that the load gets reset\&.
|
||||||
|
.SH "BUGS"
|
||||||
|
.sp
|
||||||
|
Some older APC UPS models return bogus data in the status register during a front panel test\&. This is usually detected and discarded, but some other unexpected values have occasionally slipped through\&.
|
||||||
|
.sp
|
||||||
|
APC UPS models with both USB and serial ports require a power cycle when switching from USB communication to serial, and perhaps vice versa\&.
|
||||||
|
.SH "AUTHOR"
|
||||||
|
.sp
|
||||||
|
Nigel Metheringham <Nigel\&.Metheringham@Intechnology\&.co\&.uk> (drawing heavily on the original apcsmart driver by Russell Kroll)\&. This driver was called newapc for a time and was renamed in the 1\&.5 series\&.
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.SS "The core driver:"
|
||||||
|
.sp
|
||||||
|
\fBnutupsdrv\fR(8)
|
||||||
|
.SS "Internet resources:"
|
||||||
|
.sp
|
||||||
|
The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/
|
|
@ -1,52 +1,68 @@
|
||||||
.TH APCSMART 8 "Mon Sep 29 2003" "" "Network UPS Tools (NUT)"
|
APCSMART(8)
|
||||||
.SH NAME
|
===========
|
||||||
apcsmart \- Driver for American Power Conversion Smart Protocol UPS equipment
|
|
||||||
.SH NOTE
|
NAME
|
||||||
This man page only documents the hardware\(hyspecific features of the
|
----
|
||||||
apcsmart driver. For information about the core driver, see
|
|
||||||
\fBnutupsdrv\fR(8).
|
apcsmart - Driver for American Power Conversion Smart Protocol UPS equipment
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
--------
|
||||||
|
|
||||||
|
*apcsmart* -h
|
||||||
|
|
||||||
|
*apcsmart* -a 'UPS_NAME' ['OPTIONS']
|
||||||
|
|
||||||
|
NOTE: This man page only documents the hardware-specific features of the
|
||||||
|
apcsmart driver. For information about the core driver, see
|
||||||
|
linkman:nutupsdrv[8].
|
||||||
|
|
||||||
|
SUPPORTED HARDWARE
|
||||||
|
------------------
|
||||||
|
|
||||||
.SH SUPPORTED HARDWARE
|
|
||||||
apcsmart should recognize all recent APC models that use a serial
|
apcsmart should recognize all recent APC models that use a serial
|
||||||
protocol at 2400 bps. This is primarily the Smart\(hyUPS, Matrix\(hyUPS and
|
protocol at 2400 bps. This is primarily the Smart-UPS, Matrix-UPS and
|
||||||
Back\(hyUPS Pro lines.
|
Back-UPS Pro lines.
|
||||||
|
|
||||||
The driver attempts to support every bell and whistle of the APC
|
The driver attempts to support every bell and whistle of the APC
|
||||||
reporting interface, whether or not this is strictly sensible.
|
reporting interface, whether or not this is strictly sensible.
|
||||||
|
|
||||||
Some older hardware may only report a handful of variables. This is
|
Some older hardware may only report a handful of variables. This is
|
||||||
usually not a bug \(hy they just don't support anything else.
|
usually not a bug--they just don't support anything else.
|
||||||
|
|
||||||
.SH CABLING
|
CABLING
|
||||||
|
-------
|
||||||
|
|
||||||
This driver expects to see a 940\(hy0024C cable or a clone by default. You
|
This driver expects to see a 940-0024C cable or a clone by default. You
|
||||||
can switch to the 940\(hy0095B dual\(hymode cable support with the cable=
|
can switch to the 940-0095B dual-mode cable support with the `cable=`
|
||||||
definition described below.
|
definition described below.
|
||||||
|
|
||||||
If your 940\(hy0024C cable is broken or missing, use this diagram to build
|
If your 940-0024C cable is broken or missing, use this diagram to build
|
||||||
a clone:
|
a clone:
|
||||||
|
|
||||||
http://random.networkupstools.org/cables/940\(hy0024C.jpg
|
http://www.networkupstools.org/cables/940-0024C.jpg
|
||||||
|
|
||||||
|
EXTRA ARGUMENTS
|
||||||
|
---------------
|
||||||
|
|
||||||
.SH EXTRA ARGUMENTS
|
|
||||||
This driver supports the following optional settings in the
|
This driver supports the following optional settings in the
|
||||||
\fBups.conf\fR(5):
|
linkman:ups.conf[5]:
|
||||||
|
|
||||||
.IP "cable=940\(hy0095B"
|
*cable=940-0095B*::
|
||||||
Configure the serial port for the APC 940\(hy0095B dual\(hymode cable.
|
Configure the serial port for the APC 940-0095B dual-mode cable.
|
||||||
|
|
||||||
.IP "sdtype=\fInum\fR"
|
*sdtype=*'num'::
|
||||||
Use shutdown type \fInum\fR, according to this table:
|
Use shutdown type 'num', according to this table:
|
||||||
|
|
||||||
0: soft shutdown or powerdown, depending on battery status
|
0;; soft shutdown or powerdown, depending on battery status
|
||||||
|
|
||||||
1: soft shutdown followed by powerdown
|
1;; soft shutdown followed by powerdown
|
||||||
|
|
||||||
2: instant power off
|
2;; instant power off
|
||||||
|
|
||||||
3: power off with grace period
|
3;; power off with grace period
|
||||||
|
|
||||||
4: 'force OB' hack method for CS 350
|
4;; "force OB" hack method for CS 350
|
||||||
|
|
||||||
Modes 0 and 1 will power up the load when power returns. Modes 2 and 3
|
Modes 0 and 1 will power up the load when power returns. Modes 2 and 3
|
||||||
will keep the load turned off when the power returns.
|
will keep the load turned off when the power returns.
|
||||||
|
@ -57,7 +73,9 @@ result, the driver will force the UPS to go on battery if necessary
|
||||||
before sending the shutdown command. This ensures that the load gets
|
before sending the shutdown command. This ensures that the load gets
|
||||||
reset.
|
reset.
|
||||||
|
|
||||||
.SH BUGS
|
BUGS
|
||||||
|
----
|
||||||
|
|
||||||
Some older APC UPS models return bogus data in the status register during
|
Some older APC UPS models return bogus data in the status register during
|
||||||
a front panel test. This is usually detected and discarded, but some
|
a front panel test. This is usually detected and discarded, but some
|
||||||
other unexpected values have occasionally slipped through.
|
other unexpected values have occasionally slipped through.
|
||||||
|
@ -65,15 +83,19 @@ other unexpected values have occasionally slipped through.
|
||||||
APC UPS models with both USB and serial ports require a power cycle when
|
APC UPS models with both USB and serial ports require a power cycle when
|
||||||
switching from USB communication to serial, and perhaps vice versa.
|
switching from USB communication to serial, and perhaps vice versa.
|
||||||
|
|
||||||
.SH AUTHOR
|
AUTHOR
|
||||||
|
------
|
||||||
Nigel Metheringham <Nigel.Metheringham@Intechnology.co.uk> (drawing
|
Nigel Metheringham <Nigel.Metheringham@Intechnology.co.uk> (drawing
|
||||||
heavily on the original apcsmart driver by Russell Kroll). This driver
|
heavily on the original apcsmart driver by Russell Kroll). This driver
|
||||||
was called newapc for a time and was renamed in the 1.5 series.
|
was called newapc for a time and was renamed in the 1.5 series.
|
||||||
|
|
||||||
.SH SEE ALSO
|
SEE ALSO
|
||||||
|
--------
|
||||||
|
|
||||||
.SS The core driver:
|
The core driver:
|
||||||
\fBnutupsdrv\fR(8)
|
~~~~~~~~~~~~~~~~
|
||||||
|
linkman:nutupsdrv[8]
|
||||||
|
|
||||||
.SS Internet resources:
|
Internet resources:
|
||||||
|
~~~~~~~~~~~~~~~~~~~
|
||||||
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
|
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
|
46
docs/man/asciidoc.conf
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
## Borrowed from 'linkgit' in the Git distribution.
|
||||||
|
## linkman: macro
|
||||||
|
#
|
||||||
|
# Usage: linkman:command[manpage-section]
|
||||||
|
#
|
||||||
|
# Note, {0} is the manpage section, while {target} is the command.
|
||||||
|
#
|
||||||
|
# Show NUT link as: <command>(<section>); if section is defined, else just show
|
||||||
|
# the command.
|
||||||
|
|
||||||
|
[macros]
|
||||||
|
(?su)[\\]?(?P<name>linkman):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
|
||||||
|
|
||||||
|
ifdef::backend-docbook[]
|
||||||
|
[linkman-inlinemacro]
|
||||||
|
{0%{target}}
|
||||||
|
{0#<citerefentry>}
|
||||||
|
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
|
||||||
|
{0#</citerefentry>}
|
||||||
|
endif::backend-docbook[]
|
||||||
|
|
||||||
|
ifdef::backend-xhtml11[]
|
||||||
|
[linkman-inlinemacro]
|
||||||
|
<a href="{target}.html">{target}{0?({0})}</a>
|
||||||
|
endif::backend-xhtml11[]
|
||||||
|
|
||||||
|
# Meta info for a2x manpage conversion:
|
||||||
|
ifdef::doctype-manpage[]
|
||||||
|
ifdef::backend-docbook[]
|
||||||
|
[header]
|
||||||
|
template::[header-declarations]
|
||||||
|
<refentry>
|
||||||
|
<refmeta>
|
||||||
|
<refentrytitle>{mantitle}</refentrytitle>
|
||||||
|
<manvolnum>{manvolnum}</manvolnum>
|
||||||
|
<refmiscinfo class="source">Network UPS Tools</refmiscinfo>
|
||||||
|
<refmiscinfo class="version">{nut_version}</refmiscinfo>
|
||||||
|
<refmiscinfo class="manual">NUT Manual</refmiscinfo>
|
||||||
|
</refmeta>
|
||||||
|
<refnamediv>
|
||||||
|
<refname>{manname}</refname>
|
||||||
|
<refpurpose>{manpurpose}</refpurpose>
|
||||||
|
</refnamediv>
|
||||||
|
endif::backend-docbook[]
|
||||||
|
endif::doctype-manpage[]
|
||||||
|
|