Imported Upstream version 2.7.1

This commit is contained in:
Laurent Bigonville 2013-11-24 16:00:12 +01:00
parent a1fa151fc7
commit 0121794af9
451 changed files with 41339 additions and 10887 deletions

7005
ChangeLog

File diff suppressed because it is too large Load diff

View file

@ -45,6 +45,10 @@ P: Fabio Di Niro
M: blaxwan@users.sourceforge.net
S: Maintained: metasys
P: Kirill Smelkov
M: kirr@mns.spb.ru
S: Maintained: al175
Packaging
=========

View file

@ -35,14 +35,14 @@ distcheck-light:
distcleancheck:
@:
# Automatically generate the ChangeLog from SVN logs:
# Automatically generate the ChangeLog from Git logs:
MAINTAINERCLEAN_FILES = ChangeLog
# Force ChangeLog regeneration upon make dist (due to inexistant 'dummy-stamp'),
# Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'),
# in case it has already been generated previously
dummy-stamp:
ChangeLog: tools/svn2cl.authors dummy-stamp
svn2cl --group-by-day --include-rev --authors=$< --reparagraph --revision 'HEAD:2332' --output=$@ || \
echo "svn2cl failed to generate the ChangeLog. See http://trac.networkupstools.org/projects/nut/timeline" > $@
ChangeLog: tools/gitlog2changelog.py dummy-stamp
$(top_srcdir)/tools/gitlog2changelog.py v2.6.0 || \
echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@
if HAVE_ASCIIDOC
website:
@ -110,3 +110,19 @@ snmp build-snmp install-snmp install-snmp-mgr install-snmp-man:
setver:
@echo "Error: 'make setver' no longer exists."
@echo "Edit configure.in to set version number."
package:
if test `uname -s` = "HP-UX"; then \
cd scripts/HP-UX; \
make package; \
mv NUT_HPUX_package.depot NUT_HPUX_package@PACKAGE_VERSION@.depot; \
else \
if test `uname -s` = "SunOS"; then \
make; \
rm -rf @prefix@; \
make install; \
cd scripts/Solaris; \
make package; \
make uninstall; \
rm -rf @prefix@; \
fi; \
fi;

View file

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -17,6 +17,23 @@
# top-level Makefile for NUT
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -40,6 +57,7 @@ subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure \
$(top_srcdir)/scripts/HP-UX/nut.psf.in \
$(top_srcdir)/scripts/HP-UX/postinstall.in \
$(top_srcdir)/scripts/avahi/nut.service.in \
$(top_srcdir)/scripts/ufw/nut.ufw.profile.in AUTHORS COPYING \
ChangeLog INSTALL NEWS TODO compile config.guess config.sub \
@ -58,8 +76,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
$(top_srcdir)/m4/nut_check_libltdl.m4 \
$(top_srcdir)/m4/nut_check_libneon.m4 \
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
$(top_srcdir)/m4/nut_check_libnss.m4 \
$(top_srcdir)/m4/nut_check_libopenssl.m4 \
$(top_srcdir)/m4/nut_check_libpowerman.m4 \
$(top_srcdir)/m4/nut_check_libssl.m4 \
$(top_srcdir)/m4/nut_check_libusb.m4 \
$(top_srcdir)/m4/nut_check_libwrap.m4 \
$(top_srcdir)/m4/nut_check_os.m4 \
@ -74,7 +93,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES = scripts/avahi/nut.service scripts/HP-UX/nut.psf \
scripts/ufw/nut.ufw.profile
scripts/HP-UX/postinstall scripts/ufw/nut.ufw.profile
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
@ -85,6 +104,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@ -97,9 +121,11 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@ -128,12 +154,15 @@ am__relativize = \
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
A2X = @A2X@
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
ASCIIDOC = @ASCIIDOC@
ASPELL = @ASPELL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@ -160,6 +189,7 @@ DOC_BUILD_LIST = @DOC_BUILD_LIST@
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
DRVPATH = @DRVPATH@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@ -337,7 +367,7 @@ DISTCHECK_CONFIGURE_FLAGS = ${DISTCHECK_FLAGS} \
--with-udev-dir='$${prefix}/etc/udev'
# Automatically generate the ChangeLog from SVN logs:
# Automatically generate the ChangeLog from Git logs:
MAINTAINERCLEAN_FILES = ChangeLog
# ----------------------------------------------------------------------
@ -347,7 +377,7 @@ WARN = "----------------------------------------------------------------------"
all: all-recursive
.SUFFIXES:
am--refresh:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
@ -385,6 +415,8 @@ scripts/avahi/nut.service: $(top_builddir)/config.status $(top_srcdir)/scripts/a
cd $(top_builddir) && $(SHELL) ./config.status $@
scripts/HP-UX/nut.psf: $(top_builddir)/config.status $(top_srcdir)/scripts/HP-UX/nut.psf.in
cd $(top_builddir) && $(SHELL) ./config.status $@
scripts/HP-UX/postinstall: $(top_builddir)/config.status $(top_srcdir)/scripts/HP-UX/postinstall.in
cd $(top_builddir) && $(SHELL) ./config.status $@
scripts/ufw/nut.ufw.profile: $(top_builddir)/config.status $(top_srcdir)/scripts/ufw/nut.ufw.profile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
@ -566,13 +598,10 @@ distdir: $(DISTFILES)
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 \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@ -604,7 +633,11 @@ dist-gzip: distdir
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__remove_distdir)
dist-lzma: distdir
@ -612,7 +645,7 @@ dist-lzma: distdir
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
@ -643,6 +676,8 @@ distcheck: dist
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
@ -652,7 +687,7 @@ distcheck: dist
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
chmod -R a-w $(distdir); chmod u+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
@ -662,6 +697,7 @@ distcheck: dist
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
@ -690,8 +726,16 @@ distcheck: dist
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
@ -713,10 +757,15 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@ -802,18 +851,18 @@ uninstall-am:
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
distcheck distclean distclean-generic distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info 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 mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am
dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
dist-zip distcheck distclean distclean-generic \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info 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 mostlyclean-libtool pdf pdf-am \
ps ps-am tags tags-recursive uninstall uninstall-am
distcheck-light:
@ -826,12 +875,12 @@ distcheck-light:
# find . -type f -exec sh -c 'test -f $(srcdir)/{} || echo {}' ';'
distcleancheck:
@:
# Force ChangeLog regeneration upon make dist (due to inexistant 'dummy-stamp'),
# Force ChangeLog regeneration upon make dist (due to nonexistant 'dummy-stamp'),
# in case it has already been generated previously
dummy-stamp:
ChangeLog: tools/svn2cl.authors dummy-stamp
svn2cl --group-by-day --include-rev --authors=$< --reparagraph --revision 'HEAD:2332' --output=$@ || \
echo "svn2cl failed to generate the ChangeLog. See http://trac.networkupstools.org/projects/nut/timeline" > $@
ChangeLog: tools/gitlog2changelog.py dummy-stamp
$(top_srcdir)/tools/gitlog2changelog.py v2.6.0 || \
echo "gitlog2changelog.py failed to generate the ChangeLog. See https://github.com/networkupstools/nut/commits/master" > $@
@HAVE_ASCIIDOC_TRUE@website:
@HAVE_ASCIIDOC_TRUE@ cd docs; $(MAKE) $(AM_MAKEFLAGS) website
@ -890,6 +939,22 @@ snmp build-snmp install-snmp install-snmp-mgr install-snmp-man:
setver:
@echo "Error: 'make setver' no longer exists."
@echo "Edit configure.in to set version number."
package:
if test `uname -s` = "HP-UX"; then \
cd scripts/HP-UX; \
make package; \
mv NUT_HPUX_package.depot NUT_HPUX_package@PACKAGE_VERSION@.depot; \
else \
if test `uname -s` = "SunOS"; then \
make; \
rm -rf @prefix@; \
make install; \
cd scripts/Solaris; \
make package; \
make uninstall; \
rm -rf @prefix@; \
fi; \
fi;
# 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.

86
NEWS
View file

@ -1,19 +1,97 @@
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 and more detailed list of changes, please refer to the
ChangeLog file.
---------------------------------------------------------------------------
Release notes for NUT 2.7.1 - what's new since 2.6.5:
- This release is an interim release, part of the testing series, and the
first release after the transition from Subversion to Git.
The last release (2.6.5) is almost a year old. A lot of work has
been done, but a good amount remains to achieve 2.8.0 goals.
Please read the UPGRADING notes.
- Added support for SSL via the Mozilla NSS library, in addition to the
existing OpenSSL support.
- Added a new driver, nutdrv_qx, for Megatec/Qx devices. This driver will
eventually replace the blazer_ser and blazer_usb drivers. In particular, it
adds support for Voltronic Power devices.
- Increased USB_TIMEOUT to standards-compliant 5.000 seconds in most drivers.
This should reduce the number of timeouts on low-speed USB 1.1 devices.
- The jNut Java source has been split into a separate GitHub repository.
- Added many devices to the HCL. Of particular note are many Tripp Lite USB
HID PDC models which were tested against NUT by Tripp Lite.
- Reworked some visual elements of the HCL. The output is better tailored for
graphical and text-only browsers, but suggestions are welcome for additional
accessibility enhancements.
- Also increased timeouts and added redundant commands to improve reliability
of mge-utalk driver.
- Added the apcupsd-ups driver to interoperate with apcupsd installations.
- Added documentation on creating subdrivers for snmp-ups and nutdrv_qx.
- Added new drivers for the Riello UPS product line (riello_ser/riello_usb).
- Many improvements to the BCM/XCP drivers have been merged in. This includes
an improved data reception loop, and additional mappings.
- Added a few variables to the Powercom HID mappings.
- Updated the apcsmart driver, and renamed the previous driver to apcsmart-old.
- Fixed the battery percentage calculation in the bestfcom driver.
- libnutclient has been added as a C++ alternative to libupsclient.
- Packaging files for Solaris and HP-UX (sponsored by Eaton)
- Fix shutdown of Eaton HID, using usbhid-ups and mge-shut
- usbhid-ups: final fix for APC Back UPS ES. APC Back UPS ES devices have
buggy firmware, and this version does not cause a regression. The max_report
variable should be set automatically based on the USB identification values.
- nut-scanner: fix crash
- IPMI support can handle more different versions of FreeIPMI
- Support power supplies scan over the network
nut-scanner can now scan for power supplies with IPMI over LAN.
This is currently limited to IPMI 1.5 only
- Implement a framework to spell check documentation source files,
using Aspell. This includes an interactive build target (make
spellcheck-interactive), and an automated one (make spellcheck),
mainly for QA / Buildbot purpose. Note that a base NUT dictionary
is also available (docs/nut.dict), providing a glossary of terms
related to power devices and management
- Improve systemd integration
- snmp-ups: Fixed a crash on outlet management, and added delta_ups MIB
support. Also fixed mappings for upsBypassVoltage, upsBypassCurrent, and
upsBypassPower in three-phase IETF MIB.
---------------------------------------------------------------------------
Release notes for NUT 2.6.5 - what's new since 2.6.4:
- This release Fix an important regression in upssched:
- This release fixes an important regression in upssched:
any upssched.conf command that takes a second argument resulted in
a defective frame sent to the parent process. Thus, the command was
not executed (report and patch from Oliver Schonefeld)
- Website hosting: free NUT from Eaton website hosting
NUT website (http://www.networkupstools.org) is no more hosted by Eaton.
NUT website (http://www.networkupstools.org) is no longer hosted by Eaton.
Arnaud Quette (NUT project leader) has taken over NUT hosting on his own,
to give NUT back some independance.
to give NUT back some independence.
This effort is also part of a logic to stop crediting Eaton for
contributions from others (especially Arnaud Quette, as an individual).
The new hosting service is located, as for Arnaud's blog

7
README
View file

@ -142,7 +142,7 @@ 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.
For example, the usbhid-ups driver allows you to use USB serial numbers to
distingish between units via the "serial" configuration option. To use this
distinguish between units via the "serial" configuration option. To use this
feature, just add another line to your ups.conf section for that UPS:
[sparky]
@ -209,6 +209,11 @@ and networked PDU, along with Blade and IPMI enabled servers.
See the linkman:powerman-pdu[8] man page for more
information.
- The `apcupsd-ups` driver is a bridge to the Apcupsd daemon, thus handling
all Apcupsd supported devices. The Apcupsd project supports many serial,
USB and networked APC UPS.
+
See the linkman:apcupsd-ups[8] man page for more information.
UPS Shutdowns
~~~~~~~~~~~~~

View file

@ -7,6 +7,28 @@ This file lists changes that affect users who installed older versions
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.
Changes from 2.6.5 to 2.7.1
---------------------------
- The linkman:apcsmart[8] driver has been replaced by a new implementation. There is a new
parameter, 'ttymode', which may help if you have a non-standard serial port,
or Windows. In case of issues with this new version, users can revert to
apcsmart-old.
- The linkman:nutdrv_qx[8] driver will eventually supersede blazer_ser and blazer_usb.
Options are not exactly the same, but are documented in the nutdrv_qx man
page.
- Mozilla NSS support has been added. The OpenSSL configuration options should
be unchanged, but please refer to the linkman:upsd.conf[5] and
linkman:upsmon.conf[5] documentation in case we missed something.
- linkman:upsrw[8] now prints out the maximum size of variables. Hopefully you
are not parsing the output of upsrw - it would be easier to use one of the
NUT libraries, or implement the network protocol yourself.
- The jNut source is now here: https://github.com/networkupstools/jNut
Changes from 2.6.4 to 2.6.5
---------------------------

81
aclocal.m4 vendored
View file

@ -1,7 +1,8 @@
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
# 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, 2010, 2011 Free Software Foundation,
# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -13,8 +14,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.68.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
[m4_warning([this file was generated for autoconf 2.69.
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.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
@ -286,12 +287,15 @@ else
fi[]dnl
])# PKG_CHECK_MODULES
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 1
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
@ -301,7 +305,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
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.
m4_if([$1], [1.11.1], [],
m4_if([$1], [1.11.6], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@ -317,19 +321,21 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.11.1])dnl
[AM_AUTOMAKE_VERSION([1.11.6])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 1
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@ -411,14 +417,14 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
# Free Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
# 2010, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 10
# serial 12
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@ -458,6 +464,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@ -522,7 +529,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
break
fi
;;
msvisualcpp | msvcmsys)
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
@ -587,10 +594,13 @@ AC_DEFUN([AM_DEP_TRACK],
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
AC_SUBST([am__nodep])dnl
_AM_SUBST_NOTMAKE([am__nodep])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
@ -812,12 +822,15 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 1
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
@ -857,8 +870,8 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
# Free Software Foundation, Inc.
# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
# 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -878,7 +891,7 @@ AC_DEFUN([AM_MAINTAINER_MODE],
[disable], [m4_define([am_maintainer_other], [enable])],
[m4_define([am_maintainer_other], [enable])
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
@ -1024,12 +1037,15 @@ else
fi
])
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 1
# AM_PROG_MKDIR_P
# ---------------
# Check for `mkdir -p'.
@ -1052,13 +1068,14 @@ esac
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# serial 5
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@ -1066,13 +1083,13 @@ AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# ------------------------------
# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ----------------------------------
# ------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@ -1148,12 +1165,14 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 1
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
@ -1176,13 +1195,13 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# serial 3
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
@ -1191,13 +1210,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# --------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@ -1219,10 +1238,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility.
AM_MISSING_PROG([AMTAR], [tar])
[# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
@ -1306,8 +1326,9 @@ m4_include([m4/nut_check_libhal.m4])
m4_include([m4/nut_check_libltdl.m4])
m4_include([m4/nut_check_libneon.m4])
m4_include([m4/nut_check_libnetsnmp.m4])
m4_include([m4/nut_check_libnss.m4])
m4_include([m4/nut_check_libopenssl.m4])
m4_include([m4/nut_check_libpowerman.m4])
m4_include([m4/nut_check_libssl.m4])
m4_include([m4/nut_check_libusb.m4])
m4_include([m4/nut_check_libwrap.m4])
m4_include([m4/nut_check_os.m4])

View file

@ -20,9 +20,9 @@ endif
bin_PROGRAMS = upsc upslog upsrw upscmd
dist_bin_SCRIPTS = upssched-cmd
sbin_PROGRAMS = upsmon upssched
lib_LTLIBRARIES = libupsclient.la
lib_LTLIBRARIES = libupsclient.la libnutclient.la
if WITH_DEV
include_HEADERS = upsclient.h ../include/parseconf.h
include_HEADERS = upsclient.h ../include/parseconf.h nutclient.h
endif
if WITH_CGI
cgiexec_PROGRAMS = upsstats.cgi upsimage.cgi upsset.cgi
@ -50,4 +50,10 @@ libupsclient_la_LIBADD = ../common/libparseconf.la
if WITH_SSL
libupsclient_la_LIBADD += $(LIBSSL_LIBS)
endif
libupsclient_la_LDFLAGS = -version-info 2:0:1
# libupsclient version information
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
libupsclient_la_LDFLAGS = -version-info 3:1:0
libnutclient_la_SOURCES = nutclient.h nutclient.cpp

View file

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -21,6 +21,23 @@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -66,8 +83,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
$(top_srcdir)/m4/nut_check_libltdl.m4 \
$(top_srcdir)/m4/nut_check_libneon.m4 \
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
$(top_srcdir)/m4/nut_check_libnss.m4 \
$(top_srcdir)/m4/nut_check_libopenssl.m4 \
$(top_srcdir)/m4/nut_check_libpowerman.m4 \
$(top_srcdir)/m4/nut_check_libssl.m4 \
$(top_srcdir)/m4/nut_check_libusb.m4 \
$(top_srcdir)/m4/nut_check_libwrap.m4 \
$(top_srcdir)/m4/nut_check_os.m4 \
@ -102,10 +120,19 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(cgiexecdir)" "$(DESTDIR)$(sbindir)" \
"$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
libnutclient_la_LIBADD =
am_libnutclient_la_OBJECTS = nutclient.lo
libnutclient_la_OBJECTS = $(am_libnutclient_la_OBJECTS)
am__DEPENDENCIES_1 =
@WITH_SSL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
libupsclient_la_DEPENDENCIES = ../common/libparseconf.la \
@ -175,15 +202,32 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libupsclient_la_SOURCES) $(upsc_SOURCES) $(upscmd_SOURCES) \
$(upsimage_cgi_SOURCES) $(upslog_SOURCES) $(upsmon_SOURCES) \
$(upsrw_SOURCES) $(upssched_SOURCES) $(upsset_cgi_SOURCES) \
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libnutclient_la_SOURCES) $(libupsclient_la_SOURCES) \
$(upsc_SOURCES) $(upscmd_SOURCES) $(upsimage_cgi_SOURCES) \
$(upslog_SOURCES) $(upsmon_SOURCES) $(upsrw_SOURCES) \
$(upssched_SOURCES) $(upsset_cgi_SOURCES) \
$(upsstats_cgi_SOURCES)
DIST_SOURCES = $(libupsclient_la_SOURCES) $(upsc_SOURCES) \
$(upscmd_SOURCES) $(upsimage_cgi_SOURCES) $(upslog_SOURCES) \
$(upsmon_SOURCES) $(upsrw_SOURCES) $(upssched_SOURCES) \
$(upsset_cgi_SOURCES) $(upsstats_cgi_SOURCES)
am__include_HEADERS_DIST = upsclient.h ../include/parseconf.h
DIST_SOURCES = $(libnutclient_la_SOURCES) $(libupsclient_la_SOURCES) \
$(upsc_SOURCES) $(upscmd_SOURCES) $(upsimage_cgi_SOURCES) \
$(upslog_SOURCES) $(upsmon_SOURCES) $(upsrw_SOURCES) \
$(upssched_SOURCES) $(upsset_cgi_SOURCES) \
$(upsstats_cgi_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__include_HEADERS_DIST = upsclient.h ../include/parseconf.h \
nutclient.h
HEADERS = $(include_HEADERS)
ETAGS = etags
CTAGS = ctags
@ -193,6 +237,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
ASCIIDOC = @ASCIIDOC@
ASPELL = @ASPELL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@ -219,6 +264,7 @@ DOC_BUILD_LIST = @DOC_BUILD_LIST@
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
DRVPATH = @DRVPATH@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@ -381,8 +427,8 @@ LDADD = ../common/libcommon.la libupsclient.la $(NETLIBS) \
# but only add them if we really use the target.
AM_CFLAGS = -I$(top_srcdir)/include $(am__append_2) $(am__append_3)
dist_bin_SCRIPTS = upssched-cmd
lib_LTLIBRARIES = libupsclient.la
@WITH_DEV_TRUE@include_HEADERS = upsclient.h ../include/parseconf.h
lib_LTLIBRARIES = libupsclient.la libnutclient.la
@WITH_DEV_TRUE@include_HEADERS = upsclient.h ../include/parseconf.h nutclient.h
upsc_SOURCES = upsc.c upsclient.h
upscmd_SOURCES = upscmd.c upsclient.h
upsrw_SOURCES = upsrw.c upsclient.h
@ -400,11 +446,15 @@ upsstats_cgi_SOURCES = upsstats.c upsclient.h status.h upsstats.h \
# not LDADD.
libupsclient_la_SOURCES = upsclient.c upsclient.h
libupsclient_la_LIBADD = ../common/libparseconf.la $(am__append_4)
libupsclient_la_LDFLAGS = -version-info 2:0:1
# libupsclient version information
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
libupsclient_la_LDFLAGS = -version-info 3:1:0
libnutclient_la_SOURCES = nutclient.h nutclient.cpp
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
.SUFFIXES: .c .cpp .lo .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@ -437,7 +487,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
@ -445,6 +494,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
@ -466,12 +517,17 @@ clean-libLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libupsclient.la: $(libupsclient_la_OBJECTS) $(libupsclient_la_DEPENDENCIES)
libnutclient.la: $(libnutclient_la_OBJECTS) $(libnutclient_la_DEPENDENCIES) $(EXTRA_libnutclient_la_DEPENDENCIES)
$(CXXLINK) -rpath $(libdir) $(libnutclient_la_OBJECTS) $(libnutclient_la_LIBADD) $(LIBS)
libupsclient.la: $(libupsclient_la_OBJECTS) $(libupsclient_la_DEPENDENCIES) $(EXTRA_libupsclient_la_DEPENDENCIES)
$(libupsclient_la_LINK) -rpath $(libdir) $(libupsclient_la_OBJECTS) $(libupsclient_la_LIBADD) $(LIBS)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
@ -513,8 +569,11 @@ clean-binPROGRAMS:
rm -f $$list
install-cgiexecPROGRAMS: $(cgiexec_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(cgiexecdir)" || $(MKDIR_P) "$(DESTDIR)$(cgiexecdir)"
@list='$(cgiexec_PROGRAMS)'; test -n "$(cgiexecdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(cgiexecdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(cgiexecdir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
@ -556,8 +615,11 @@ clean-cgiexecPROGRAMS:
rm -f $$list
install-sbinPROGRAMS: $(sbin_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
@list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
@ -597,37 +659,40 @@ clean-sbinPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
upsc$(EXEEXT): $(upsc_OBJECTS) $(upsc_DEPENDENCIES)
upsc$(EXEEXT): $(upsc_OBJECTS) $(upsc_DEPENDENCIES) $(EXTRA_upsc_DEPENDENCIES)
@rm -f upsc$(EXEEXT)
$(LINK) $(upsc_OBJECTS) $(upsc_LDADD) $(LIBS)
upscmd$(EXEEXT): $(upscmd_OBJECTS) $(upscmd_DEPENDENCIES)
upscmd$(EXEEXT): $(upscmd_OBJECTS) $(upscmd_DEPENDENCIES) $(EXTRA_upscmd_DEPENDENCIES)
@rm -f upscmd$(EXEEXT)
$(LINK) $(upscmd_OBJECTS) $(upscmd_LDADD) $(LIBS)
upsimage.cgi$(EXEEXT): $(upsimage_cgi_OBJECTS) $(upsimage_cgi_DEPENDENCIES)
upsimage.cgi$(EXEEXT): $(upsimage_cgi_OBJECTS) $(upsimage_cgi_DEPENDENCIES) $(EXTRA_upsimage_cgi_DEPENDENCIES)
@rm -f upsimage.cgi$(EXEEXT)
$(LINK) $(upsimage_cgi_OBJECTS) $(upsimage_cgi_LDADD) $(LIBS)
upslog$(EXEEXT): $(upslog_OBJECTS) $(upslog_DEPENDENCIES)
upslog$(EXEEXT): $(upslog_OBJECTS) $(upslog_DEPENDENCIES) $(EXTRA_upslog_DEPENDENCIES)
@rm -f upslog$(EXEEXT)
$(LINK) $(upslog_OBJECTS) $(upslog_LDADD) $(LIBS)
upsmon$(EXEEXT): $(upsmon_OBJECTS) $(upsmon_DEPENDENCIES)
upsmon$(EXEEXT): $(upsmon_OBJECTS) $(upsmon_DEPENDENCIES) $(EXTRA_upsmon_DEPENDENCIES)
@rm -f upsmon$(EXEEXT)
$(LINK) $(upsmon_OBJECTS) $(upsmon_LDADD) $(LIBS)
upsrw$(EXEEXT): $(upsrw_OBJECTS) $(upsrw_DEPENDENCIES)
upsrw$(EXEEXT): $(upsrw_OBJECTS) $(upsrw_DEPENDENCIES) $(EXTRA_upsrw_DEPENDENCIES)
@rm -f upsrw$(EXEEXT)
$(LINK) $(upsrw_OBJECTS) $(upsrw_LDADD) $(LIBS)
upssched$(EXEEXT): $(upssched_OBJECTS) $(upssched_DEPENDENCIES)
upssched$(EXEEXT): $(upssched_OBJECTS) $(upssched_DEPENDENCIES) $(EXTRA_upssched_DEPENDENCIES)
@rm -f upssched$(EXEEXT)
$(LINK) $(upssched_OBJECTS) $(upssched_LDADD) $(LIBS)
upsset.cgi$(EXEEXT): $(upsset_cgi_OBJECTS) $(upsset_cgi_DEPENDENCIES)
upsset.cgi$(EXEEXT): $(upsset_cgi_OBJECTS) $(upsset_cgi_DEPENDENCIES) $(EXTRA_upsset_cgi_DEPENDENCIES)
@rm -f upsset.cgi$(EXEEXT)
$(LINK) $(upsset_cgi_OBJECTS) $(upsset_cgi_LDADD) $(LIBS)
upsstats.cgi$(EXEEXT): $(upsstats_cgi_OBJECTS) $(upsstats_cgi_DEPENDENCIES)
upsstats.cgi$(EXEEXT): $(upsstats_cgi_OBJECTS) $(upsstats_cgi_DEPENDENCIES) $(EXTRA_upsstats_cgi_DEPENDENCIES)
@rm -f upsstats.cgi$(EXEEXT)
$(LINK) $(upsstats_cgi_OBJECTS) $(upsstats_cgi_LDADD) $(LIBS)
install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@ -655,9 +720,7 @@ uninstall-dist_binSCRIPTS:
@list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@ -666,6 +729,7 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgilib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutclient.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upsclient.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/upscmd.Po@am__quote@
@ -698,6 +762,27 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
.cpp.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cpp.lo:
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@ -705,8 +790,11 @@ clean-libtool:
-rm -rf .libs _libs
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
$(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@ -720,9 +808,7 @@ uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(includedir)" && rm -f $$files
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@ -825,10 +911,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:

View file

@ -17,6 +17,12 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
#endif
/* other programs that link to this should provide parsearg() ... */
void parsearg(char *var, char *value);
@ -29,3 +35,9 @@ void extractpostargs(void);
/* see if a host is allowed per the hosts.conf */
int checkhost(const char *host, char **desc);
#ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
#endif

1726
clients/nutclient.cpp Normal file

File diff suppressed because it is too large Load diff

963
clients/nutclient.h Normal file
View file

@ -0,0 +1,963 @@
/* nutclient.h - definitions for nutclient C/C++ library
Copyright (C) 2012 Emilien Kia <emilien.kia@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef NUTCLIENT_HPP_SEEN
#define NUTCLIENT_HPP_SEEN
/* Begin of C++ nutclient library declaration */
#ifdef __cplusplus
#include <string>
#include <vector>
#include <map>
#include <set>
#include <exception>
namespace nut
{
namespace internal
{
class Socket;
} /* namespace internal */
class Client;
class TcpClient;
class Device;
class Variable;
class Command;
/**
* Basic nut exception.
*/
class NutException : public std::exception
{
public:
NutException(const std::string& msg):_msg(msg){}
virtual ~NutException() throw() {}
virtual const char * what() const throw() {return this->_msg.c_str();}
virtual std::string str() const throw() {return this->_msg;}
private:
std::string _msg;
};
/**
* System error.
*/
class SystemException : public NutException
{
public:
SystemException();
virtual ~SystemException() throw() {}
private:
static std::string err();
};
/**
* IO oriented nut exception.
*/
class IOException : public NutException
{
public:
IOException(const std::string& msg):NutException(msg){}
virtual ~IOException() throw() {}
};
/**
* IO oriented nut exception specialized for unknown host
*/
class UnknownHostException : public IOException
{
public:
UnknownHostException():IOException("Unknown host"){}
virtual ~UnknownHostException() throw() {}
};
/**
* IO oriented nut exception when client is not connected
*/
class NotConnectedException : public IOException
{
public:
NotConnectedException():IOException("Not connected"){}
virtual ~NotConnectedException() throw() {}
};
/**
* IO oriented nut exception when there is no response.
*/
class TimeoutException : public IOException
{
public:
TimeoutException():IOException("Timeout"){}
virtual ~TimeoutException() throw() {}
};
/**
* A nut client is the starting point to dialog to NUTD.
* It can connect to an NUTD then retrieve its device list.
* Use a specific client class to connect to a NUTD.
*/
class Client
{
friend class Device;
friend class Variable;
friend class Command;
public:
~Client();
/**
* Intend to authenticate to a NUTD server.
* Set the username and password associated to the connection.
* \param user User name.
* \param passwd Password.
* \todo Is his method is global to all connection protocol or is it specific to TCP ?
* \note Actually, authentication fails only if already set, not if bad values are sent.
*/
virtual void authenticate(const std::string& user, const std::string& passwd)throw(NutException)=0;
/**
* Disconnect from the NUTD server.
* \todo Is his method is global to all connection protocol or is it specific to TCP ?
*/
virtual void logout()throw(NutException)=0;
/**
* Device manipulations.
* \see nut::Device
* \{
*/
/**
* Retrieve a device from its name.
* If the device does not exist, a bad (not ok) device is returned.
* \param name Name of the device.
* \return The device.
*/
virtual Device getDevice(const std::string& name)throw(NutException);
/**
* Retrieve the list of all devices supported by UPSD server.
* \return The set of supported devices.
*/
virtual std::set<Device> getDevices()throw(NutException);
/**
* Test if a device is supported by the NUTD server.
* \param dev Device name.
* \return true if supported, false otherwise.
*/
virtual bool hasDevice(const std::string& dev)throw(NutException);
/**
* Retrieve names of devices supported by NUTD server.
* \return The set of names of supported devices.
*/
virtual std::set<std::string> getDeviceNames()throw(NutException)=0;
/**
* Retrieve the description of a device.
* \param name Device name.
* \return Device description.
*/
virtual std::string getDeviceDescription(const std::string& name)throw(NutException)=0;
/** \} */
/**
* Variable manipulations.
* \see nut::Variable
* \{
*/
/**
* Retrieve names of all variables supported by a device.
* \param dev Device name
* \return Variable names
*/
virtual std::set<std::string> getDeviceVariableNames(const std::string& dev)throw(NutException)=0;
/**
* Retrieve names of read/write variables supported by a device.
* \param dev Device name
* \return RW variable names
*/
virtual std::set<std::string> getDeviceRWVariableNames(const std::string& dev)throw(NutException)=0;
/**
* Test if a variable is supported by a device.
* \param dev Device name
* \param name Variable name
* \return true if the variable is supported.
*/
virtual bool hasDeviceVariable(const std::string& dev, const std::string& name)throw(NutException);
/**
* Retrieve the description of a variable.
* \param dev Device name
* \param name Variable name
* \return Variable description if provided.
*/
virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name)throw(NutException)=0;
/**
* Retrieve values of a variable.
* \param dev Device name
* \param name Variable name
* \return Variable values (usually one) if available.
*/
virtual std::vector<std::string> getDeviceVariableValue(const std::string& dev, const std::string& name)throw(NutException)=0;
/**
* Retrieve values of all variables of a device.
* \param dev Device name
* \return Variable values indexed by variable names.
*/
virtual std::map<std::string,std::vector<std::string> > getDeviceVariableValues(const std::string& dev)throw(NutException);
/**
* Intend to set the value of a variable.
* \param dev Device name
* \param name Variable name
* \param value Variable value
*/
virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)throw(NutException)=0;
/**
* Intend to set the value of a variable.
* \param dev Device name
* \param name Variable name
* \param value Variable value
*/
virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector<std::string>& values)throw(NutException)=0;
/** \} */
/**
* Instant command manipulations.
* \see nut::Command
* \{
*/
/**
* Retrieve names of all commands supported by a device.
* \param dev Device name
* \return Command names
*/
virtual std::set<std::string> getDeviceCommandNames(const std::string& dev)throw(NutException)=0;
/**
* Test if a command is supported by a device.
* \param dev Device name
* \param name Command name
* \return true if the command is supported.
*/
virtual bool hasDeviceCommand(const std::string& dev, const std::string& name)throw(NutException);
/**
* Retrieve the description of a command.
* \param dev Device name
* \param name Command name
* \return Command description if provided.
*/
virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name)throw(NutException)=0;
/**
* Intend to execute a command.
* \param dev Device name
* \param name Command name
*/
virtual void executeDeviceCommand(const std::string& dev, const std::string& name)throw(NutException)=0;
/** \} */
/**
* Device specific commands.
* \{
*/
/**
* Log the current user (if authenticated) for a device.
* \param dev Device name.
*/
virtual void deviceLogin(const std::string& dev)throw(NutException)=0;
/**
* Retrieve the number of user longged in the specified device.
* \param dev Device name.
* \return Number of logged-in users.
*/
virtual int deviceGetNumLogins(const std::string& dev)throw(NutException)=0;
virtual void deviceMaster(const std::string& dev)throw(NutException)=0;
virtual void deviceForcedShutdown(const std::string& dev)throw(NutException)=0;
protected:
Client();
};
/**
* TCP NUTD client.
* It connect to NUTD with a TCP socket.
*/
class TcpClient : public Client
{
public:
/**
* Construct a nut TcpClient object.
* You must call one of TcpClient::connect() after.
*/
TcpClient();
/**
* Construct a nut TcpClient object then connect it to the specified server.
* \param host Server host name.
* \param port Server port.
*/
TcpClient(const std::string& host, int port = 3493)throw(nut::IOException);
~TcpClient();
/**
* Connect it to the specified server.
* \param host Server host name.
* \param port Server port.
*/
void connect(const std::string& host, int port = 3493)throw(nut::IOException);
/**
* Connect to the server.
* Host name and ports must have already set (usefull for reconnection).
*/
void connect()throw(nut::IOException);
/**
* Test if the connection is active.
* \return tru if the connection is active.
*/
bool isConnected()const;
/**
* Force the deconnection.
*/
void disconnect();
/**
* Set the timeout in seconds.
* \param timeout Timeout n seconds, negative to block operations.
*/
void setTimeout(long timeout);
/**
* Retrieve the timeout.
* \returns Current timeout in seconds.
*/
long getTimeout()const;
/**
* Retriueve the host name of the server the client is connected to.
* \return Server host name
*/
std::string getHost()const;
/**
* Retriueve the port of host of the server the client is connected to.
* \return Server port
*/
int getPort()const;
virtual void authenticate(const std::string& user, const std::string& passwd)throw(NutException);
virtual void logout()throw(NutException);
virtual Device getDevice(const std::string& name)throw(NutException);
virtual std::set<std::string> getDeviceNames()throw(NutException);
virtual std::string getDeviceDescription(const std::string& name)throw(NutException);
virtual std::set<std::string> getDeviceVariableNames(const std::string& dev)throw(NutException);
virtual std::set<std::string> getDeviceRWVariableNames(const std::string& dev)throw(NutException);
virtual std::string getDeviceVariableDescription(const std::string& dev, const std::string& name)throw(NutException);
virtual std::vector<std::string> getDeviceVariableValue(const std::string& dev, const std::string& name)throw(NutException);
virtual std::map<std::string,std::vector<std::string> > getDeviceVariableValues(const std::string& dev)throw(NutException);
virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::string& value)throw(NutException);
virtual void setDeviceVariable(const std::string& dev, const std::string& name, const std::vector<std::string>& values)throw(NutException);
virtual std::set<std::string> getDeviceCommandNames(const std::string& dev)throw(NutException);
virtual std::string getDeviceCommandDescription(const std::string& dev, const std::string& name)throw(NutException);
virtual void executeDeviceCommand(const std::string& dev, const std::string& name)throw(NutException);
virtual void deviceLogin(const std::string& dev)throw(NutException);
virtual void deviceMaster(const std::string& dev)throw(NutException);
virtual void deviceForcedShutdown(const std::string& dev)throw(NutException);
virtual int deviceGetNumLogins(const std::string& dev)throw(NutException);
protected:
std::string sendQuery(const std::string& req)throw(nut::IOException);
static void detectError(const std::string& req)throw(nut::NutException);
std::vector<std::string> get(const std::string& subcmd, const std::string& params = "")
throw(nut::NutException);
std::vector<std::vector<std::string> > list(const std::string& subcmd, const std::string& params = "")
throw(nut::NutException);
static std::vector<std::string> explode(const std::string& str, size_t begin=0);
static std::string escape(const std::string& str);
private:
std::string _host;
int _port;
long _timeout;
internal::Socket* _socket;
};
/**
* Device attached to a client.
* Device is a lightweight class which can be copied easily.
*/
class Device
{
friend class Client;
friend class TcpClient;
public:
~Device();
Device(const Device& dev);
/**
* Retrieve the name of the device.
* The name is the unique id under which NUTD known the device.
*/
std::string getName()const;
/**
* Retrieve the client to which the device is attached.
*/
const Client* getClient()const;
/**
* Retrieve the client to which the device is attached.
*/
Client* getClient();
/**
* Test if the device is valid (has a name and is attached to a client).
*/
bool isOk()const;
/**
* Test if the device is valid (has a name and is attached to a client).
* @see Device::isOk()
*/
operator bool()const;
/**
* Test if the device is not valid (has no name or is not attached to any client).
* @see Device::isOk()
*/
bool operator!()const;
/**
* Test if the two devices are sames (same name ad same client attached to).
*/
bool operator==(const Device& dev)const;
/**
* Comparison operator.
*/
bool operator<(const Device& dev)const;
/**
* Retrieve the description of the devce if specified.
*/
std::string getDescription()throw(NutException);
/**
* Intend to retrieve the value of a variable of the device.
* \param name Name of the variable to get.
* \return Value of the variable, if available.
*/
std::vector<std::string> getVariableValue(const std::string& name)throw(NutException);
/**
* Intend to retrieve values of all variables of the devices.
* \return Map of all variables values indexed by their names.
*/
std::map<std::string,std::vector<std::string> > getVariableValues()throw(NutException);
/**
* Retrieve all variables names supported by the device.
* \return Set of available variable names.
*/
std::set<std::string> getVariableNames()throw(NutException);
/**
* Retrieve all Read/Write variables names supported by the device.
* \return Set of available Read/Write variable names.
*/
std::set<std::string> getRWVariableNames()throw(NutException);
/**
* Intend to set the value of a variable of the device.
* \param name Variable name.
* \param value New variable value.
*/
void setVariable(const std::string& name, const std::string& value)throw(NutException);
/**
* Intend to set values of a variable of the device.
* \param name Variable name.
* \param value New variable values.
*/
void setVariable(const std::string& name, const std::vector<std::string>& values)throw(NutException);
/**
* Retrieve a Variable object representing the specified variable.
* \param name Variable name.
* \return Variable object.
*/
Variable getVariable(const std::string& name)throw(NutException);
/**
* Retrieve Variable objects representing all variables available for the device.
* \return Set of Variable objects.
*/
std::set<Variable> getVariables()throw(NutException);
/**
* Retrieve Variable objects representing all Read/Write variables available for the device.
* \return Set of Variable objects.
*/
std::set<Variable> getRWVariables()throw(NutException);
/**
* Retrieve names of all commands supported by the device.
* \return Set of available command names.
*/
std::set<std::string> getCommandNames()throw(NutException);
/**
* Retrieve objects for all commands supported by the device.
* \return Set of available Command objects.
*/
std::set<Command> getCommands()throw(NutException);
/**
* Retrieve an object representing a command of the device.
* \param name Command name.
* \return Command object.
*/
Command getCommand(const std::string& name)throw(NutException);
/**
* Intend to execute a command on the device.
* \param name Command name.
*/
void executeCommand(const std::string& name)throw(NutException);
/**
* Login current client's user for the device.
*/
void login()throw(NutException);
void master()throw(NutException);
void forcedShutdown()throw(NutException);
/**
* Retrieve the number of logged user for the device.
* \return Number of users.
*/
int getNumLogins()throw(NutException);
protected:
Device(Client* client, const std::string& name);
private:
Client* _client;
std::string _name;
};
/**
* Variable attached to a device.
* Variable is a lightweight class which can be copied easily.
*/
class Variable
{
friend class Device;
friend class TcpClient;
public:
~Variable();
Variable(const Variable& var);
/**
* Retrieve variable name.
*/
std::string getName()const;
/**
* Retrieve the device to which the variable is attached to.
*/
const Device* getDevice()const;
/**
* Retrieve the device to which the variable is attached to.
*/
Device* getDevice();
/**
* Test if the variable is valid (has a name and is attached to a device).
*/
bool isOk()const;
/**
* Test if the variable is valid (has a name and is attached to a device).
* @see Variable::isOk()
*/
operator bool()const;
/**
* Test if the variable is not valid (has no name or is not attached to any device).
* @see Variable::isOk()
*/
bool operator!()const;
/**
* Test if the two variables are sames (same name ad same device attached to).
*/
bool operator==(const Variable& var)const;
/**
* Less-than operator (based on variable name) to allow variable sorting.
*/
bool operator<(const Variable& var)const;
/**
* Intend to retrieve variable value.
* \return Value of the variable.
*/
std::vector<std::string> getValue()throw(NutException);
/**
* Intend to retireve variable description.
* \return Variable description if provided.
*/
std::string getDescription()throw(NutException);
/**
* Intend to set a value to the variable.
* \param value New variable value.
*/
void setValue(const std::string& value)throw(NutException);
/**
* Intend to set (multiple) values to the variable.
* \param value New variable values.
*/
void setValues(const std::vector<std::string>& values)throw(NutException);
protected:
Variable(Device* dev, const std::string& name);
private:
Device* _device;
std::string _name;
};
/**
* Command attached to a device.
* Command is a lightweight class which can be copied easily.
*/
class Command
{
friend class Device;
friend class TcpClient;
public:
~Command();
Command(const Command& cmd);
/**
* Retrieve command name.
*/
std::string getName()const;
/**
* Retrieve the device to which the command is attached to.
*/
const Device* getDevice()const;
/**
* Retrieve the device to which the command is attached to.
*/
Device* getDevice();
/**
* Test if the command is valid (has a name and is attached to a device).
*/
bool isOk()const;
/**
* Test if the command is valid (has a name and is attached to a device).
* @see Command::isOk()
*/
operator bool()const;
/**
* Test if the command is not valid (has no name or is not attached to any device).
* @see Command::isOk()
*/
bool operator!()const;
/**
* Test if the two commands are sames (same name ad same device attached to).
*/
bool operator==(const Command& var)const;
/**
* Less-than operator (based on command name) to allow comand sorting.
*/
bool operator<(const Command& var)const;
/**
* Intend to retireve command description.
* \return Command description if provided.
*/
std::string getDescription()throw(NutException);
/**
* Intend to retrieve command description.
* \return Command description if provided.
*/
void execute()throw(NutException);
protected:
Command(Device* dev, const std::string& name);
private:
Device* _device;
std::string _name;
};
} /* namespace nut */
#endif /* __cplusplus */
/* End of C++ nutclient library declaration */
/* Begin of C nutclient library declaration */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
* Array of string manipulation functions.
* \{
*/
/** Array of string.*/
typedef char** strarr;
/**
* Alloc an array of string.
*/
strarr strarr_alloc(unsigned short count);
/**
* Free an array of string.
*/
void strarr_free(strarr arr);
/**
* Nut general client types and functions.
* \{
*/
/** Hidden structure representing a connection to NUTD. */
typedef void* NUTCLIENT_t;
/**
* Destroy a client.
* \param client Nut client handle.
*/
void nutclient_destroy(NUTCLIENT_t client);
/**
* Authenticate into the server.
* \param client Nut client handle.
* \param login User name.
* \param passwd Password.
*/
void nutclient_authenticate(NUTCLIENT_t client, const char* login, const char* passwd);
/**
* Log out from server.
* \param client Nut client handle.
*/
void nutclient_logout(NUTCLIENT_t client);
/**
* Register current user on the device.
* \param client Nut client handle.
* \param dev Device name to test.
*/
void nutclient_device_login(NUTCLIENT_t client, const char* dev);
/**
* Retrieve the number of users registered on a device.
* \param client Nut client handle.
* \param dev Device name to test.
*/
int nutclient_get_device_num_logins(NUTCLIENT_t client, const char* dev);
/**
* Set current user as master user of the device.
* \param client Nut client handle.
* \param dev Device name to test.
*/
void nutclient_device_master(NUTCLIENT_t client, const char* dev);
/**
* Set the FSD flag for the device.
* \param client Nut client handle.
* \param dev Device name to test.
*/
void nutclient_device_forced_shutdown(NUTCLIENT_t client, const char* dev);
/**
* Retrieve the list of devices of a client.
* \param client Nut client handle.
* \return Array of string containing device names. Must be freed with strarr_free(strarr).
*/
strarr nutclient_get_devices(NUTCLIENT_t client);
/**
* Test if a device is supported by the client.
* \param client Nut client handle.
* \param dev Device name to test.
* \return 1 if supported, 0 otherwise.
*/
int nutclient_has_device(NUTCLIENT_t client, const char* dev);
/**
* Intend to retrieve device description.
* \param client Nut client handle.
* \param dev Device name to test.
* \return Description of device. Must be freed after use.
*/
char* nutclient_get_device_description(NUTCLIENT_t client, const char* dev);
/**
* Intend to retrieve device variable names.
* \param client Nut client handle.
* \param dev Device name.
* \return Array of string containing variable names. Must be freed with strarr_free(strarr).
*/
strarr nutclient_get_device_variables(NUTCLIENT_t client, const char* dev);
/**
* Intend to retrieve device read/write variable names.
* \param client Nut client handle.
* \param dev Device name.
* \return Array of string containing read/write variable names. Must be freed with strarr_free(strarr).
*/
strarr nutclient_get_device_rw_variables(NUTCLIENT_t client, const char* dev);
/**
* Test if a variable is supported by the device and the client.
* \param client Nut client handle.
* \param dev Device name.
* \param var Variable name.
* \return 1 if supported, 0 otherwise.
*/
int nutclient_has_device_variable(NUTCLIENT_t client, const char* dev, const char* var);
/**
* Intend to retrieve device variable description.
* \param client Nut client handle.
* \param dev Device name.
* \param var Variable name.
* \return Description of device variable. Must be freed after use.
*/
char* nutclient_get_device_variable_description(NUTCLIENT_t client, const char* dev, const char* var);
/**
* Intend to retrieve device variable values.
* \param client Nut client handle.
* \param dev Device name.
* \param var Variable name.
* \return Array of string containing variable values. Must be freed with strarr_free(strarr).
*/
strarr nutclient_get_device_variable_values(NUTCLIENT_t client, const char* dev, const char* var);
/**
* Intend to set device variable value.
* \param client Nut client handle.
* \param dev Device name.
* \param var Variable name.
* \param value Value to set.
*/
void nutclient_set_device_variable_value(NUTCLIENT_t client, const char* dev, const char* var, const char* value);
/**
* Intend to set device variable multiple values.
* \param client Nut client handle.
* \param dev Device name.
* \param var Variable name.
* \param values Values to set. The cller is responsible to free it after call.
*/
void nutclient_set_device_variable_values(NUTCLIENT_t client, const char* dev, const char* var, const strarr values);
/**
* Intend to retrieve device command names.
* \param client Nut client handle.
* \param dev Device name.
* \return Array of string containing command names. Must be freed with strarr_free(strarr).
*/
strarr nutclient_get_device_commands(NUTCLIENT_t client, const char* dev);
/**
* Test if a command is supported by the device and the client.
* \param client Nut client handle.
* \param dev Device name.
* \param cmd Command name.
* \return 1 if supported, 0 otherwise.
*/
int nutclient_has_device_command(NUTCLIENT_t client, const char* dev, const char* cmd);
/**
* Intend to retrieve device command description.
* \param client Nut client handle.
* \param dev Device name.
* \param cmd Command name.
* \return Description of device command. Must be freed after use.
*/
char* nutclient_get_device_command_description(NUTCLIENT_t client, const char* dev, const char* cmd);
/**
* Intend to execute device command.
* \param client Nut client handle.
* \param dev Device name.
* \param cmd Command name.
*/
void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const char* cmd);
/** \} */
/**
* Nut TCP client dedicated types and functions
* \{
*/
/**
* Hidden structure representing a TCP connection to NUTD.
* NUTCLIENT_TCP_t is back compatible to NUTCLIENT_t.
*/
typedef NUTCLIENT_t NUTCLIENT_TCP_t;
/**
* Create a client to NUTD using a TCP connection.
* \param host Host name to connect to.
* \param port Host port.
* \return New client or NULL if failed.
*/
NUTCLIENT_TCP_t nutclient_tcp_create_client(const char* host, unsigned short port);
/**
* Test if a nut TCP client is connected.
* \param client Nut TCP client handle.
* \return 1 if connected, 0 otherwise.
*/
int nutclient_tcp_is_connected(NUTCLIENT_TCP_t client);
/**
* Disconnect a nut TCP client.
* \param client Nut TCP client handle.
*/
void nutclient_tcp_disconnect(NUTCLIENT_TCP_t client);
/**
* Intend to reconnect a nut TCP client.
* \param client Nut TCP client handle.
* \return 0 if correctly connected.
* \todo Implement different error codes.
*/
int nutclient_tcp_reconnect(NUTCLIENT_TCP_t client);
/**
* Set the timeout value for the TCP connection.
* \param timeout Timeout in seconds, negative for blocking.
*/
void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, long timeout);
/**
* Retrieve the timeout value for the TCP connection.
* \return Timeout value in seconds.
*/
long nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client);
/** \} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
/* End of C nutclient library declaration */
#endif /* NUTCLIENT_HPP_SEEN */

View file

@ -17,6 +17,12 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
#endif
struct {
char *name;
char *desc;
@ -35,3 +41,10 @@ struct {
{ "BYPASS", "BYPASS", 2 },
{ NULL, NULL, 0 }
};
#ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
#endif

View file

@ -19,6 +19,7 @@
*/
#include "common.h"
#include "nut_platform.h"
#include <netdb.h>
#include <netinet/in.h>
@ -274,3 +275,11 @@ int main(int argc, char **argv)
exit(EXIT_SUCCESS);
}
/* Formal do_upsconf_args implementation to satisfy linker on AIX */
#if (defined NUT_PLATFORM_AIX)
void do_upsconf_args(char *upsname, char *var, char *val) {
fatalx(EXIT_FAILURE, "INTERNAL ERROR: formal do_upsconf_args called");
}
#endif /* end of #if (defined NUT_PLATFORM_AIX) */

View file

@ -21,6 +21,11 @@
#include "config.h" /* safe because it doesn't contain prototypes */
#ifdef HAVE_PTHREAD
/* this include is needed on AIX to have errno stored in thread local storage */
#include <pthread.h>
#endif
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
@ -33,8 +38,18 @@
#include <fcntl.h>
#include "upsclient.h"
#include "common.h"
#include "timehead.h"
#ifdef WITH_NSS
#include <prerror.h>
#include <prinit.h>
#include <pk11func.h>
#include <prtypes.h>
#include <ssl.h>
#include <private/pprio.h>
#endif /* WITH_NSS */
#define UPSCLIENT_MAGIC 0x19980308
#define SMALLBUF 512
@ -95,9 +110,354 @@ struct {
{ 0, "Protocol error", }, /* 42: UPSCLI_ERR_PROTOCOL */
};
typedef struct HOST_CERT_s {
const char *host;
const char *certname;
int certverify;
int forcessl;
struct HOST_CERT_s *next;
} HOST_CERT_t;
static HOST_CERT_t* upscli_find_host_cert(const char* hostname);
static int upscli_initialized = 0;
#ifdef WITH_OPENSSL
static SSL_CTX *ssl_ctx;
#elif defined(WITH_NSS) /* WITH_OPENSLL */
static int verify_certificate = 1;
static HOST_CERT_t *first_host_cert = NULL;
static char* nsscertname = NULL;
static char* nsscertpasswd = NULL;
#endif /* WITH_OPENSSL | WITH_NSS */
#ifdef WITH_OPENSSL
static void ssl_debug(void)
{
int e;
char errmsg[SMALLBUF];
while ((e = ERR_get_error()) != 0) {
ERR_error_string_n(e, errmsg, sizeof(errmsg));
upsdebugx(2, "ssl_debug: %s", errmsg);
}
}
static int ssl_error(SSL *ssl, int ret)
{
int e;
e = SSL_get_error(ssl, ret);
switch (e)
{
case SSL_ERROR_WANT_READ:
upslogx(LOG_ERR, "ssl_error() ret=%d SSL_ERROR_WANT_READ", ret);
break;
case SSL_ERROR_WANT_WRITE:
upslogx(LOG_ERR, "ssl_error() ret=%d SSL_ERROR_WANT_WRITE", ret);
break;
case SSL_ERROR_SYSCALL:
if (ret == 0 && ERR_peek_error() == 0) {
upslogx(LOG_ERR, "ssl_error() EOF from client");
} else {
upslogx(LOG_ERR, "ssl_error() ret=%d SSL_ERROR_SYSCALL", ret);
}
break;
default:
upslogx(LOG_ERR, "ssl_error() ret=%d SSL_ERROR %d", ret, e);
ssl_debug();
}
return -1;
}
#elif defined(WITH_NSS) /* WITH_OPENSSL */
static char *nss_password_callback(PK11SlotInfo *slot, PRBool retry,
void *arg)
{
upslogx(LOG_INFO, "Intend to retrieve password for %s / %s: password %sconfigured",
PK11_GetSlotName(slot), PK11_GetTokenName(slot), nsscertpasswd?"":"not ");
return nsscertpasswd ? PL_strdup(nsscertpasswd) : NULL;
}
static void nss_error(const char* funcname)
{
char buffer[SMALLBUF];
PRInt32 length = PR_GetErrorText(buffer);
if (length > 0 && length < SMALLBUF) {
upsdebugx(1, "nss_error %ld in %s : %s", (long)PR_GetError(), funcname, buffer);
}else{
upsdebugx(1, "nss_error %ld in %s", (long)PR_GetError(), funcname);
}
}
static SECStatus AuthCertificate(CERTCertDBHandle *arg, PRFileDesc *fd,
PRBool checksig, PRBool isServer)
{
UPSCONN_t *ups = (UPSCONN_t *)SSL_RevealPinArg(fd);
SECStatus status = SSL_AuthCertificate(arg, fd, checksig, isServer);
upslogx(LOG_INFO, "Intend to authenticate server %s : %s",
ups?ups->host:"<unnamed>",
status==SECSuccess?"SUCCESS":"FAILED");
if (status != SECSuccess) {
nss_error("SSL_AuthCertificate");
}
return status;
}
static SECStatus AuthCertificateDontVerify(CERTCertDBHandle *arg, PRFileDesc *fd,
PRBool checksig, PRBool isServer)
{
UPSCONN_t *ups = (UPSCONN_t *)SSL_RevealPinArg(fd);
upslogx(LOG_INFO, "Do not intend to authenticate server %s",
ups?ups->host:"<unnamed>");
return SECSuccess;
}
static SECStatus BadCertHandler(UPSCONN_t *arg, PRFileDesc *fd)
{
HOST_CERT_t* cert;
upslogx(LOG_WARNING, "Certificate validation failed for %s",
(arg&&arg->host)?arg->host:"<unnamed>");
/* BadCertHandler is called when the NSS certificate validation is failed.
* If the certificate verification (user conf) is mandatory, reject authentication
* else accept it.
*/
cert = upscli_find_host_cert(arg->host);
if (cert != NULL) {
return cert->certverify==0 ? SECSuccess : SECFailure;
} else {
return verify_certificate==0 ? SECSuccess : SECFailure;
}
}
static SECStatus GetClientAuthData(UPSCONN_t *arg, PRFileDesc *fd,
CERTDistNames *caNames, CERTCertificate **pRetCert, SECKEYPrivateKey **pRetKey)
{
CERTCertificate *cert;
SECKEYPrivateKey *privKey;
SECStatus status = NSS_GetClientAuthData(arg, fd, caNames, pRetCert, pRetKey);
if (status == SECFailure) {
if (nsscertname != NULL) {
cert = PK11_FindCertFromNickname(nsscertname, NULL);
if(cert==NULL) {
upslogx(LOG_ERR, "Can not find self-certificate");
nss_error("GetClientAuthData / PK11_FindCertFromNickname");
}else{
privKey = PK11_FindKeyByAnyCert(cert, NULL);
if(privKey==NULL){
upslogx(LOG_ERR, "Can not find private key related to self-certificate");
nss_error("GetClientAuthData / PK11_FindKeyByAnyCert");
}else{
*pRetCert = cert;
*pRetKey = privKey;
status = SECSuccess;
}
}
} else {
upslogx(LOG_ERR, "Self-certificate name not configured");
}
}
return status;
}
static void HandshakeCallback(PRFileDesc *fd, UPSCONN_t *client_data)
{
upslogx(LOG_INFO, "SSL handshake done successfully with server %s",
client_data->host);
}
#endif /* WITH_OPENSSL | WITH_NSS */
int upscli_init(int certverify, const char *certpath,
const char *certname, const char *certpasswd)
{
#ifdef WITH_OPENSSL
int ret, ssl_mode = SSL_VERIFY_NONE;
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
const SSL_METHOD *ssl_method;
#else
SSL_METHOD *ssl_method;
#endif
#elif defined(WITH_NSS) /* WITH_OPENSSL */
SECStatus status;
#endif /* WITH_OPENSSL | WITH_NSS */
if (upscli_initialized == 1) {
upslogx(LOG_WARNING, "upscli already initialized");
return -1;
}
#ifdef WITH_OPENSSL
SSL_library_init();
SSL_load_error_strings();
ssl_method = TLSv1_client_method();
if (!ssl_method) {
return 0;
}
ssl_ctx = SSL_CTX_new(ssl_method);
if (!ssl_ctx) {
upslogx(LOG_ERR, "Can not initialize SSL context");
return -1;
}
if (!certpath) {
if (certverify == 1) {
upslogx(LOG_ERR, "Can not verify certificate if any is specified");
return -1; /* Failed : cert is mandatory but no certfile */
}
} else {
switch(certverify) {
case 0:
ssl_mode = SSL_VERIFY_NONE;
break;
default:
ssl_mode = SSL_VERIFY_PEER;
break;
}
ret = SSL_CTX_load_verify_locations(ssl_ctx, NULL, certpath);
if (ret != 1) {
upslogx(LOG_ERR, "Failed to load certificate from pemfile %s", certpath);
return -1;
}
SSL_CTX_set_verify(ssl_ctx, ssl_mode, NULL);
}
#elif defined(WITH_NSS) /* WITH_OPENSSL */
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PK11_SetPasswordFunc(nss_password_callback);
if (certpath) {
upslogx(LOG_INFO, "Init SSL with cerificate database located at %s", certpath);
status = NSS_Init(certpath);
} else {
upslogx(LOG_NOTICE, "Init SSL without certificate database");
status = NSS_NoDB_Init(NULL);
}
if (status != SECSuccess) {
upslogx(LOG_ERR, "Can not initialize SSL context");
nss_error("upscli_init / NSS_[NoDB]_Init");
return -1;
}
status = NSS_SetDomesticPolicy();
if (status != SECSuccess) {
upslogx(LOG_ERR, "Can not initialize SSL policy");
nss_error("upscli_init / NSS_SetDomesticPolicy");
return -1;
}
SSL_ClearSessionCache();
status = SSL_OptionSetDefault(SSL_ENABLE_SSL3, PR_TRUE);
if (status != SECSuccess) {
upslogx(LOG_ERR, "Can not enable SSLv3");
nss_error("upscli_init / SSL_OptionSetDefault(SSL_ENABLE_SSL3)");
return -1;
}
status = SSL_OptionSetDefault(SSL_ENABLE_TLS, PR_TRUE);
if (status != SECSuccess) {
upslogx(LOG_ERR, "Can not enable TLSv1");
nss_error("upscli_init / SSL_OptionSetDefault(SSL_ENABLE_TLS)");
return -1;
}
status = SSL_OptionSetDefault(SSL_V2_COMPATIBLE_HELLO, PR_FALSE);
if (status != SECSuccess) {
upslogx(LOG_ERR, "Can not disable SSLv2 hello compatibility");
nss_error("upscli_init / SSL_OptionSetDefault(SSL_V2_COMPATIBLE_HELLO)");
return -1;
}
if (certname) {
nsscertname = xstrdup(certname);
}
if (certpasswd) {
nsscertpasswd = xstrdup(certpasswd);
}
verify_certificate = certverify;
#endif /* WITH_OPENSSL | WITH_NSS */
upscli_initialized = 1;
return 1;
}
void upscli_add_host_cert(const char* hostname, const char* certname, int certverify, int forcessl)
{
#ifdef WITH_NSS
HOST_CERT_t* cert = xmalloc(sizeof(HOST_CERT_t));
cert->next = first_host_cert;
cert->host = xstrdup(hostname);
cert->certname = xstrdup(certname);
cert->certverify = certverify;
cert->forcessl = forcessl;
first_host_cert = cert;
#endif /* WITH_NSS */
}
static HOST_CERT_t* upscli_find_host_cert(const char* hostname)
{
#ifdef WITH_NSS
HOST_CERT_t* cert = first_host_cert;
if (hostname != NULL) {
while (cert != NULL) {
if (cert->host != NULL && strcmp(cert->host, hostname)==0 ) {
return cert;
}
cert = cert->next;
}
}
#endif /* WITH_NSS */
return NULL;
}
int upscli_cleanup()
{
#ifdef WITH_OPENSSL
if (ssl_ctx) {
SSL_CTX_free(ssl_ctx);
ssl_ctx = NULL;
}
#endif /* WITH_OPENSSL */
#ifdef WITH_NSS
/* Called to force cache clearing to prevent NSS shutdown failures.
* http://www.mozilla.org/projects/security/pki/nss/ref/ssl/sslfnc.html#1138601
*/
SSL_ClearSessionCache();
NSS_Shutdown();
PR_Cleanup();
/* Called to release memory arena used by NSS/NSPR.
* Prevent to show all PL_ArenaAllocate mem alloc as leaks.
* https://developer.mozilla.org/en/NSS_Memory_allocation
*/
PL_ArenaFinish();
#endif /* WITH_NSS */
upscli_initialized = 0;
return 1;
}
const char *upscli_strerror(UPSCONN_t *ups)
{
#ifdef HAVE_SSL
#ifdef WITH_OPENSSL
unsigned long err;
char sslbuf[UPSCLI_ERRBUF_LEN];
#endif
@ -126,7 +486,7 @@ const char *upscli_strerror(UPSCONN_t *ups)
return ups->errbuf;
case 2: /* SSL error */
#ifdef HAVE_SSL
#ifdef WITH_OPENSSL
err = ERR_get_error();
if (err) {
ERR_error_string(err, sslbuf);
@ -138,10 +498,18 @@ const char *upscli_strerror(UPSCONN_t *ups)
upscli_errlist[ups->upserror].str,
"peer disconnected");
}
#elif defined(WITH_NSS) /* WITH_OPENSSL */
if (PR_GetErrorTextLength() < UPSCLI_ERRBUF_LEN) {
PR_GetErrorText(ups->errbuf);
} else {
snprintf(ups->errbuf, UPSCLI_ERRBUF_LEN,
"SSL error #%ld, message too long to be displayed",
(long)PR_GetError());
}
#else
snprintf(ups->errbuf, UPSCLI_ERRBUF_LEN,
"SSL error, but SSL wasn't enabled at compile-time");
#endif /* HAVE_SSL */
#endif /* WITH_OPENSSL | WITH_NSS */
return ups->errbuf;
case 3: /* parsing (parseconf) error */
@ -162,7 +530,7 @@ const char *upscli_strerror(UPSCONN_t *ups)
/* Read up to buflen bytes from fd and return the number of bytes
read. If no data is available within d_sec + d_usec, return 0.
On error, a value < 0 is returned (errno indicates error). */
static int select_read(const int fd, void *buf, const size_t buflen, const long d_sec, const long d_usec)
static int upscli_select_read(const int fd, void *buf, const size_t buflen, const long d_sec, const long d_usec)
{
int ret;
fd_set fds;
@ -188,9 +556,13 @@ static int net_read(UPSCONN_t *ups, char *buf, size_t buflen)
{
int ret;
#ifdef HAVE_SSL
#ifdef WITH_SSL
if (ups->ssl) {
#ifdef WITH_OPENSSL
ret = SSL_read(ups->ssl, buf, buflen);
#elif defined(WITH_NSS) /* WITH_OPENSSL */
ret = PR_Read(ups->ssl, buf, buflen);
#endif /* WITH_OPENSSL | WITH_NSS*/
if (ret < 1) {
ups->upserror = UPSCLI_ERR_SSLERR;
@ -200,7 +572,7 @@ static int net_read(UPSCONN_t *ups, char *buf, size_t buflen)
}
#endif
ret = select_read(ups->fd, buf, buflen, 5, 0);
ret = upscli_select_read(ups->fd, buf, buflen, 5, 0);
/* error reading data, server disconnected? */
if (ret < 0) {
@ -219,7 +591,7 @@ static int net_read(UPSCONN_t *ups, char *buf, size_t buflen)
/* Write up to buflen bytes to fd and return the number of bytes
written. If no data is available within d_sec + d_usec, return 0.
On error, a value < 0 is returned (errno indicates error). */
static int select_write(const int fd, const void *buf, const size_t buflen, const long d_sec, const long d_usec)
static int upscli_select_write(const int fd, const void *buf, const size_t buflen, const long d_sec, const long d_usec)
{
int ret;
fd_set fds;
@ -245,9 +617,13 @@ static int net_write(UPSCONN_t *ups, const char *buf, size_t buflen)
{
int ret;
#ifdef HAVE_SSL
#ifdef WITH_SSL
if (ups->ssl) {
#ifdef WITH_OPENSSL
ret = SSL_write(ups->ssl, buf, buflen);
#elif defined(WITH_NSS) /* WITH_OPENSSL */
ret = PR_Write(ups->ssl, buf, buflen);
#endif /* WITH_OPENSSL | WITH_NSS */
if (ret < 1) {
ups->upserror = UPSCLI_ERR_SSLERR;
@ -257,7 +633,7 @@ static int net_write(UPSCONN_t *ups, const char *buf, size_t buflen)
}
#endif
ret = select_write(ups->fd, buf, buflen, 0, 0);
ret = upscli_select_write(ups->fd, buf, buflen, 0, 0);
/* error writing data, server disconnected? */
if (ret < 0) {
@ -273,39 +649,34 @@ static int net_write(UPSCONN_t *ups, const char *buf, size_t buflen)
return ret;
}
/* stub first */
#ifndef HAVE_SSL
static int upscli_sslinit(UPSCONN_t *ups)
#ifdef WITH_SSL
/*
* 1 : OK
* -1 : ERROR
* 0 : SSL NOT SUPPORTED
*/
static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
{
return 0; /* not supported */
}
int upscli_sslcert(UPSCONN_t *ups, const char *dir, const char *file, int verify)
{
if (!ups) {
return -1;
}
/* if forcing the verification, this fails since we have no SSL */
if (verify == 1) {
ups->upserror = UPSCLI_ERR_SSLFAIL;
return -1;
}
return 0; /* not supported */
}
#else
static int upscli_sslinit(UPSCONN_t *ups)
{
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
const SSL_METHOD *ssl_method;
#else
SSL_METHOD *ssl_method;
#endif
#ifdef WITH_OPENSSL
int res;
#elif defined(WITH_NSS) /* WITH_OPENSSL */
SECStatus status;
PRFileDesc *socket;
HOST_CERT_t *cert;
#endif /* WITH_OPENSSL | WITH_NSS */
char buf[UPSCLI_NETBUF_LEN];
/* Intend to initialize upscli with no ssl db if not already done.
* Compatibility stuff for old clients which do not initialize them.
*/
if (upscli_initialized==0) {
upsdebugx(3, "upscli not initialized, "
"force initialisation without SSL configuration");
upscli_init(0, NULL, NULL, NULL);
}
/* see if upsd even talks SSL/TLS */
snprintf(buf, sizeof(buf), "STARTTLS\n");
@ -323,83 +694,149 @@ static int upscli_sslinit(UPSCONN_t *ups)
/* upsd is happy, so let's crank up the client */
SSL_load_error_strings();
SSL_library_init();
#ifdef WITH_OPENSSL
ssl_method = TLSv1_client_method();
if (!ssl_method) {
if (!ssl_ctx) {
upsdebugx(3, "SSL context is not available");
return 0;
}
ups->ssl_ctx = SSL_CTX_new(ssl_method);
if (!ups->ssl_ctx) {
return 0;
}
ups->ssl = SSL_new(ups->ssl_ctx);
ups->ssl = SSL_new(ssl_ctx);
if (!ups->ssl) {
upsdebugx(3, "Can not create SSL socket");
return 0;
}
if (SSL_set_fd(ups->ssl, ups->fd) != 1) {
upsdebugx(3, "Can not bind file descriptor to SSL socket");
return -1;
}
SSL_set_connect_state(ups->ssl);
return 1; /* OK */
}
/* set the paths for the certs to verify the server */
int upscli_sslcert(UPSCONN_t *ups, const char *file, const char *path, int verify)
{
int ret, ssl_mode = SSL_VERIFY_NONE;
if (!ups) {
return -1;
if (verifycert != 0) {
SSL_set_verify(ups->ssl, SSL_VERIFY_PEER, NULL);
} else {
SSL_set_verify(ups->ssl, SSL_VERIFY_NONE, NULL);
}
if (!ups->ssl_ctx) {
ups->upserror = UPSCLI_ERR_INVALIDARG;
return -1;
}
switch(verify) {
case 0:
ssl_mode = SSL_VERIFY_NONE;
break;
res = SSL_connect(ups->ssl);
switch(res)
{
case 1:
ssl_mode = SSL_VERIFY_PEER;
upsdebugx(3, "SSL connected");
break;
case 0:
upslog_with_errno(1, "SSL_connect do not accept handshake.");
ssl_error(ups->ssl, res);
return -1;
default:
ups->upserror = UPSCLI_ERR_INVALIDARG;
upslog_with_errno(1, "Unknown return value from SSL_connect %d", res);
ssl_error(ups->ssl, res);
return -1;
}
ret = SSL_CTX_load_verify_locations(ups->ssl_ctx, file, path);
if (ret != 1) {
ups->upserror = UPSCLI_ERR_SSLERR;
return -1;
}
SSL_set_verify(ups->ssl, ssl_mode, NULL);
return 1;
#elif defined(WITH_NSS) /* WITH_OPENSSL */
socket = PR_ImportTCPSocket(ups->fd);
if (socket == NULL){
nss_error("upscli_sslinit / PR_ImportTCPSocket");
return -1;
}
ups->ssl = SSL_ImportFD(NULL, socket);
if (ups->ssl == NULL){
nss_error("upscli_sslinit / SSL_ImportFD");
return -1;
}
if (SSL_SetPKCS11PinArg(ups->ssl, ups) == -1){
nss_error("upscli_sslinit / SSL_SetPKCS11PinArg");
return -1;
}
if (verifycert) {
status = SSL_AuthCertificateHook(ups->ssl,
(SSLAuthCertificate)AuthCertificate, CERT_GetDefaultCertDB());
} else {
status = SSL_AuthCertificateHook(ups->ssl,
(SSLAuthCertificate)AuthCertificateDontVerify, CERT_GetDefaultCertDB());
}
if (status != SECSuccess) {
nss_error("upscli_sslinit / SSL_AuthCertificateHook");
return -1;
}
status = SSL_BadCertHook(ups->ssl, (SSLBadCertHandler)BadCertHandler, ups);
if (status != SECSuccess) {
nss_error("upscli_sslinit / SSL_BadCertHook");
return -1;
}
status = SSL_GetClientAuthDataHook(ups->ssl, (SSLGetClientAuthData)GetClientAuthData, ups);
if (status != SECSuccess) {
nss_error("upscli_sslinit / SSL_GetClientAuthDataHook");
return -1;
}
status = SSL_HandshakeCallback(ups->ssl, (SSLHandshakeCallback)HandshakeCallback, ups);
if (status != SECSuccess) {
nss_error("upscli_sslinit / SSL_HandshakeCallback");
return -1;
}
cert = upscli_find_host_cert(ups->host);
if (cert != NULL && cert->certname != NULL) {
upslogx(LOG_INFO, "Connecting in SSL to '%s' and look at certificate called '%s'",
ups->host, cert->certname);
status = SSL_SetURL(ups->ssl, cert->certname);
} else {
upslogx(LOG_NOTICE, "Connecting in SSL to '%s' (no certificate name specified)", ups->host);
status = SSL_SetURL(ups->ssl, ups->host);
}
if (status != SECSuccess) {
nss_error("upscli_sslinit / SSL_SetURL");
return -1;
}
status = SSL_ResetHandshake(ups->ssl, PR_FALSE);
if (status != SECSuccess) {
nss_error("upscli_sslinit / SSL_ResetHandshake");
ups->ssl = NULL;
/* EKI wtf unimport or free the socket ? */
return -1;
}
status = SSL_ForceHandshake(ups->ssl);
if (status != SECSuccess) {
nss_error("upscli_sslinit / SSL_ForceHandshake");
ups->ssl = NULL;
/* EKI wtf unimport or free the socket ? */
/* TODO : Close the connection. */
return -1;
}
return 1;
#endif /* WITH_OPENSSL | WITH_NSS */
}
#endif /* HAVE_SSL */
#else /* WITH_SSL */
static int upscli_sslinit(UPSCONN_t *ups, int verifycert)
{
return 0; /* not supported */
}
#endif /* WITH_SSL */
int upscli_tryconnect(UPSCONN_t *ups, const char *host, int port, int flags,struct timeval * timeout)
{
int sock_fd;
int sock_fd;
struct addrinfo hints, *res, *ai;
char sport[NI_MAXSERV];
int v;
int v, certverify, tryssl, forcessl, ret;
HOST_CERT_t* hostcert;
fd_set wfds;
int error;
socklen_t error_size;
@ -552,22 +989,46 @@ int upscli_tryconnect(UPSCONN_t *ups, const char *host, int port, int flags,stru
ups->port = port;
if (flags & UPSCLI_CONN_TRYSSL) {
upscli_sslinit(ups);
hostcert = upscli_find_host_cert(host);
/* see if something made us die inside sslinit */
if (ups->upserror != 0) {
if (hostcert != NULL) {
/* An host security rule is specified. */
certverify = hostcert->certverify;
forcessl = hostcert->forcessl;
} else {
certverify = (flags & UPSCLI_CONN_CERTVERIF) != 0 ? 1 : 0;
forcessl = (flags & UPSCLI_CONN_REQSSL) != 0 ? 1 : 0;
}
tryssl = (flags & UPSCLI_CONN_TRYSSL) != 0 ? 1 : 0;
if (tryssl || forcessl) {
ret = upscli_sslinit(ups, certverify);
if (forcessl && ret != 1) {
upslogx(LOG_ERR, "Can not connect to %s in SSL, disconnect", host);
ups->upserror = UPSCLI_ERR_SSLFAIL;
upscli_disconnect(ups);
return -1;
} else if (tryssl && ret == -1) {
upslogx(LOG_NOTICE, "Error while connecting to %s, disconnect", host);
upscli_disconnect(ups);
return -1;
} else if (tryssl && ret == 0) {
if (certverify != 0) {
upslogx(LOG_NOTICE, "Can not connect to %s in SSL and "
"certificate is needed, disconnect", host);
upscli_disconnect(ups);
return -1;
}
upsdebugx(3, "Can not connect to %s in SSL, continue uncrypted", host);
} else {
upslogx(LOG_INFO, "Connected to %s in SSL", host);
if (certverify == 0) {
/* you REALLY should set CERTVERIFY to 1 if using SSL... */
upslogx(LOG_WARNING, "Certificate verification is disabled");
}
}
}
if ((flags & UPSCLI_CONN_REQSSL) && (upscli_sslinit(ups) != 1)) {
ups->upserror = UPSCLI_ERR_SSLFAIL;
upscli_disconnect(ups);
return -1;
}
return 0;
}
@ -1044,18 +1505,19 @@ int upscli_disconnect(UPSCONN_t *ups)
net_write(ups, "LOGOUT\n", 7);
#ifdef HAVE_SSL
#ifdef WITH_OPENSSL
if (ups->ssl) {
SSL_shutdown(ups->ssl);
SSL_free(ups->ssl);
ups->ssl = NULL;
}
if (ups->ssl_ctx) {
SSL_CTX_free(ups->ssl_ctx);
ups->ssl_ctx = NULL;
#elif defined(WITH_NSS) /* WITH_OPENSSL */
if (ups->ssl) {
PR_Shutdown(ups->ssl, PR_SHUTDOWN_BOTH);
PR_Close(ups->ssl);
ups->ssl = NULL;
}
#endif
#endif /* WITH_OPENSSL | WITH_NSS */
shutdown(ups->fd, shutdown_how);
@ -1101,9 +1563,11 @@ int upscli_ssl(UPSCONN_t *ups)
return -1;
}
#ifdef WITH_SSL
if (ups->ssl) {
return 1;
}
#endif /* WITH_SSL */
return 0;
}

View file

@ -20,10 +20,13 @@
#ifndef UPSCLIENT_H_SEEN
#define UPSCLIENT_H_SEEN
#ifdef HAVE_SSL
#include <openssl/err.h>
#include <openssl/ssl.h>
#endif
#ifdef WITH_OPENSSL
#include <openssl/err.h>
#include <openssl/ssl.h>
#elif defined(WITH_NSS) /* WITH_OPENSSL */
#include <nss.h>
#include <ssl.h>
#endif /* WITH_OPENSSL | WITH_NSS */
#ifdef __cplusplus
/* *INDENT-OFF* */
@ -49,13 +52,13 @@ typedef struct {
char errbuf[UPSCLI_ERRBUF_LEN];
#ifdef HAVE_SSL
SSL_CTX *ssl_ctx;
#ifdef WITH_OPENSSL
SSL *ssl;
#else
void *ssl_ctx;
void *ssl;
#endif
#elif defined(WITH_NSS) /* WITH_OPENSSL */
PRFileDesc *ssl;
#else /* WITH_OPENSSL | WITH_NSS */
void *ssl;
#endif /* WITH_OPENSSL | WITH_NSS */
char readbuf[64];
size_t readlen;
@ -65,10 +68,14 @@ typedef struct {
const char *upscli_strerror(UPSCONN_t *ups);
int upscli_tryconnect(UPSCONN_t *ups, const char *host, int port, int flags, struct timeval *tv);
int upscli_init(int certverify, const char *certpath, const char *certname, const char *certpasswd);
int upscli_cleanup();
int upscli_tryconnect(UPSCONN_t *ups, const char *host, int port, int flags, struct timeval *tv);
int upscli_connect(UPSCONN_t *ups, const char *host, int port, int flags);
void upscli_add_host_cert(const char* hostname, const char* certname, int certverify, int forcessl);
/* --- functions that only use the new names --- */
int upscli_get(UPSCONN_t *ups, unsigned int numq, const char **query,
@ -88,8 +95,6 @@ int upscli_splitname(const char *buf, char **upsname, char **hostname,
int upscli_splitaddr(const char *buf, char **hostname, int *port);
int upscli_sslcert(UPSCONN_t *ups, const char *file, const char *path, int verify);
int upscli_disconnect(UPSCONN_t *ups);
/* these functions return elements from UPSCONN_t to avoid direct references */
@ -156,10 +161,11 @@ int upscli_ssl(UPSCONN_t *ups);
/* flags for use with upscli_connect */
#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_INET 0x0004 /* IPv4 only */
#define UPSCLI_CONN_INET6 0x0008 /* IPv6 only */
#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_INET 0x0004 /* IPv4 only */
#define UPSCLI_CONN_INET6 0x0008 /* IPv6 only */
#define UPSCLI_CONN_CERTVERIF 0x0010 /* Verify certificates for SSL */
#ifdef __cplusplus
/* *INDENT-OFF* */

View file

@ -18,6 +18,7 @@
*/
#include "common.h"
#include "nut_platform.h"
#include <pwd.h>
#include <netdb.h>
@ -316,3 +317,11 @@ int main(int argc, char **argv)
exit(EXIT_SUCCESS);
}
/* Formal do_upsconf_args implementation to satisfy linker on AIX */
#if (defined NUT_PLATFORM_AIX)
void do_upsconf_args(char *upsname, char *var, char *val) {
fatalx(EXIT_FAILURE, "INTERNAL ERROR: formal do_upsconf_args called");
}
#endif /* end of #if (defined NUT_PLATFORM_AIX) */

View file

@ -17,6 +17,12 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
#endif
struct {
char *name;
int val; /* hex digits, ala HTML */
@ -58,3 +64,10 @@ typedef struct {
} imgvar_t;
extern imgvar_t imgvar[];
#ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
#endif

View file

@ -32,6 +32,7 @@
*/
#include "common.h"
#include "nut_platform.h"
#include "upsclient.h"
#include "config.h"
@ -528,3 +529,11 @@ int main(int argc, char **argv)
exit(EXIT_SUCCESS);
}
/* Formal do_upsconf_args implementation to satisfy linker on AIX */
#if (defined NUT_PLATFORM_AIX)
void do_upsconf_args(char *upsname, char *var, char *val) {
fatalx(EXIT_FAILURE, "INTERNAL ERROR: formal do_upsconf_args called");
}
#endif /* end of #if (defined NUT_PLATFORM_AIX) */

View file

@ -1,5 +1,11 @@
/* upslog.h - table of functions for handling various logging functions */
#ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
#endif
/* function list */
typedef struct flist_s {
void (*fptr)(const char *arg);
@ -27,3 +33,10 @@ struct {
{ "ETIME", do_etime },
{ NULL, (void(*)())(NULL) }
};
#ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
#endif

View file

@ -68,6 +68,8 @@ static char *run_as_user = NULL;
/* SSL details - where to find certs, whether to use them */
static char *certpath = NULL;
static char *certname = NULL;
static char *certpasswd = NULL;
static int certverify = 0; /* don't verify by default */
static int forcessl = 0; /* don't require ssl by default */
@ -1178,10 +1180,25 @@ static int parse_conf_arg(int numargs, char **arg)
return 1;
}
/* CERTIDENT <name> <passwd> */
if (!strcmp(arg[0], "CERTIDENT")) {
free(certname);
certname = xstrdup(arg[1]);
free(certpasswd);
certpasswd = xstrdup(arg[2]);
return 1;
}
/* using up to arg[4] below */
if (numargs < 5)
return 0;
/* CERTHOST <hostname> <certname> (0|1) (0|1) */
if (!strcmp(arg[0], "CERTHOST")) {
upscli_add_host_cert(arg[1], arg[2], atoi(arg[3]), atoi(arg[4]));
return 1;
}
if (!strcmp(arg[0], "MONITOR")) {
/* original style: no username (only 5 args) */
@ -1300,6 +1317,8 @@ static void upsmon_cleanup(void)
for (i = 0; notifylist[i].name != NULL; i++) {
free(notifylist[i].msg);
}
upscli_cleanup();
}
static void user_fsd(int sig)
@ -1362,51 +1381,6 @@ static void update_crittimer(utype_t *ups)
/* fallthrough: let the timer age */
}
static int try_ssl(utype_t *ups)
{
int ret;
/* if not doing SSL, we're done */
if (!upscli_ssl(&ups->conn))
return 1;
if (!certpath) {
if (certverify == 1) {
upslogx(LOG_ERR, "Configuration error: "
"CERTVERIFY is set, but CERTPATH isn't");
upslogx(LOG_ERR, "UPS [%s]: Connection impossible, "
"dropping link", ups->sys);
ups_is_gone(ups);
drop_connection(ups);
return 0; /* failed */
}
/* certverify is 0, so just warn them and return */
upslogx(LOG_WARNING, "Certificate verification is disabled");
return 1;
}
/* you REALLY should set CERTVERIFY to 1 if using SSL... */
if (certverify == 0)
upslogx(LOG_WARNING, "Certificate verification is disabled");
ret = upscli_sslcert(&ups->conn, NULL, certpath, certverify);
if (ret < 0) {
upslogx(LOG_ERR, "UPS [%s]: SSL certificate set failed: %s",
ups->sys, upscli_strerror(&ups->conn));
ups_is_gone(ups);
drop_connection(ups);
return 0;
}
return 1;
}
/* handle connecting to upsd, plus get SSL going too if possible */
static int try_connect(utype_t *ups)
{
@ -1428,21 +1402,33 @@ static int try_connect(utype_t *ups)
if (opt_af == AF_INET6)
flags |= UPSCLI_CONN_INET6;
if (!certpath) {
if (certverify == 1) {
upslogx(LOG_ERR, "Configuration error: "
"CERTVERIFY is set, but CERTPATH isn't");
upslogx(LOG_ERR, "UPS [%s]: Connection impossible, "
"dropping link", ups->sys);
ups_is_gone(ups);
drop_connection(ups);
return 0; /* failed */
}
}
if (certverify == 1) {
flags |= UPSCLI_CONN_CERTVERIF;
}
ret = upscli_connect(&ups->conn, ups->hostname, ups->port, flags);
if (ret < 0) {
upslogx(LOG_ERR, "UPS [%s]: connect failed: %s",
ups->sys, upscli_strerror(&ups->conn));
ups_is_gone(ups);
return 0;
}
ret = try_ssl(ups);
if (ret == 0)
return 0; /* something broke while trying SSL */
/* we're definitely connected now */
setflag(&ups->status, ST_CONNECTED);
@ -1999,6 +1985,10 @@ int main(int argc, char *argv[])
writepid(prog);
}
if (upscli_init(certverify, certpath, certname, certpasswd) < 0) {
exit(EXIT_FAILURE);
}
/* prep our signal handlers */
setup_signals();

View file

@ -30,6 +30,12 @@
/* required contents of flag file */
#define SDMAGIC "upsmon-shutdown-file"
#ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
#endif
/* UPS tracking structure */
typedef struct {
@ -110,3 +116,9 @@ struct {
/* various constants */
#define NET_TIMEOUT 10 /* wait 10 seconds max for upsd to respond */
#ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
#endif

View file

@ -18,6 +18,7 @@
*/
#include "common.h"
#include "nut_platform.h"
#include <pwd.h>
#include <netdb.h>
@ -202,7 +203,7 @@ static const char *get_data(const char *type, const char *varname)
return answer[3];
}
static void do_string(const char *varname)
static void do_string(const char *varname, const int len)
{
const char *val;
@ -213,6 +214,7 @@ static void do_string(const char *varname)
}
printf("Type: STRING\n");
printf("Maximum length: %d\n", len);
printf("Value: %s\n", val);
}
@ -355,8 +357,13 @@ static void do_type(const char *varname)
}
if (!strncasecmp(answer[i], "STRING:", 7)) {
do_string(varname);
char *len = answer[i] + 7;
int length = strtol(len, NULL, 10);
do_string(varname, length);
return;
}
/* ignore this one */
@ -518,3 +525,11 @@ int main(int argc, char **argv)
exit(EXIT_SUCCESS);
}
/* Formal do_upsconf_args implementation to satisfy linker on AIX */
#if (defined NUT_PLATFORM_AIX)
void do_upsconf_args(char *upsname, char *var, char *val) {
fatalx(EXIT_FAILURE, "INTERNAL ERROR: formal do_upsconf_args called");
}
#endif /* end of #if (defined NUT_PLATFORM_AIX) */

View file

@ -6,9 +6,22 @@
#define SERIALIZE_SET 2
#define SERIALIZE_WAIT 3
#ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
#endif
/* track client connections */
typedef struct conn_s {
int fd;
PCONF_CTX_t ctx;
struct conn_s *next;
} conn_t;
#ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
#endif

View file

@ -17,8 +17,21 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
#endif
typedef struct {
char *sys;
char *desc;
void *next;
} ulist_t;
#ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
#endif

View file

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -18,6 +18,23 @@
# Network UPS Tools: common
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -54,8 +71,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
$(top_srcdir)/m4/nut_check_libltdl.m4 \
$(top_srcdir)/m4/nut_check_libneon.m4 \
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
$(top_srcdir)/m4/nut_check_libnss.m4 \
$(top_srcdir)/m4/nut_check_libopenssl.m4 \
$(top_srcdir)/m4/nut_check_libpowerman.m4 \
$(top_srcdir)/m4/nut_check_libssl.m4 \
$(top_srcdir)/m4/nut_check_libusb.m4 \
$(top_srcdir)/m4/nut_check_libwrap.m4 \
$(top_srcdir)/m4/nut_check_os.m4 \
@ -91,6 +109,11 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libcommon_la_SOURCES) $(libparseconf_la_SOURCES)
DIST_SOURCES = $(libcommon_la_SOURCES) $(libparseconf_la_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@ -99,6 +122,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
ASCIIDOC = @ASCIIDOC@
ASPELL = @ASPELL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@ -125,6 +149,7 @@ DOC_BUILD_LIST = @DOC_BUILD_LIST@
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
DRVPATH = @DRVPATH@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@ -332,9 +357,9 @@ clean-noinstLTLIBRARIES:
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES)
libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) $(EXTRA_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) $(EXTRA_libparseconf_la_DEPENDENCIES)
$(LINK) $(libparseconf_la_OBJECTS) $(libparseconf_la_LIBADD) $(LIBS)
mostlyclean-compile:
@ -475,10 +500,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:

View file

@ -452,6 +452,68 @@ void upsdebug_hex(int level, const char *msg, const void *buf, int len)
upsdebugx(level, "%s", line);
}
/* taken from www.asciitable.com */
static const char* ascii_symb[] = {
"NUL", /* 0x00 */
"SOH", /* 0x01 */
"STX", /* 0x02 */
"ETX", /* 0x03 */
"EOT", /* 0x04 */
"ENQ", /* 0x05 */
"ACK", /* 0x06 */
"BEL", /* 0x07 */
"BS", /* 0x08 */
"TAB", /* 0x09 */
"LF", /* 0x0A */
"VT", /* 0x0B */
"FF", /* 0x0C */
"CR", /* 0x0D */
"SO", /* 0x0E */
"SI", /* 0x0F */
"DLE", /* 0x10 */
"DC1", /* 0x11 */
"DC2", /* 0x12 */
"DC3", /* 0x13 */
"DC4", /* 0x14 */
"NAK", /* 0x15 */
"SYN", /* 0x16 */
"ETB", /* 0x17 */
"CAN", /* 0x18 */
"EM", /* 0x19 */
"SUB", /* 0x1A */
"ESC", /* 0x1B */
"FS", /* 0x1C */
"GS", /* 0x1D */
"RS", /* 0x1E */
"US" /* 0x1F */
};
/* dump message msg and len bytes from buf to upsdebugx(level) in ascii. */
void upsdebug_ascii(int level, const char *msg, const void *buf, int len)
{
char line[256];
int i;
unsigned char ch;
if (nut_debug_level < level)
return; /* save cpu cycles */
snprintf(line, sizeof(line), "%s", msg);
for (i=0; i<len; ++i) {
ch = ((unsigned char *)buf)[i];
if (ch < 0x20)
snprintfcat(line, sizeof(line), "%3s ", ascii_symb[ch]);
else if (ch >= 0x80)
snprintfcat(line, sizeof(line), "%02Xh ", ch);
else
snprintfcat(line, sizeof(line), "'%c' ", ch);
}
upsdebugx(level, "%s", line);
}
static void vfatal(const char *fmt, va_list va, int use_strerror)
{
if (xbit_test(upslog_flags, UPSLOG_STDERR_ON_FATAL))

View file

@ -14,4 +14,4 @@ else
endif
dist_sysconf_DATA = $(SECFILES) $(PUBFILES) $(CGI_INSTALL)
nodist_sysconf_DATA = upssched.conf.sample
nodist_sysconf_DATA = upssched.conf.sample upsmon.conf.sample

View file

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -18,6 +18,23 @@
# Network UPS Tools: conf
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -39,7 +56,8 @@ host_triplet = @host@
target_triplet = @target@
subdir = conf
DIST_COMMON = $(am__dist_sysconf_DATA_DIST) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/upssched.conf.sample.in
$(srcdir)/Makefile.in $(srcdir)/upsmon.conf.sample.in \
$(srcdir)/upssched.conf.sample.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@ -54,8 +72,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
$(top_srcdir)/m4/nut_check_libltdl.m4 \
$(top_srcdir)/m4/nut_check_libneon.m4 \
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
$(top_srcdir)/m4/nut_check_libnss.m4 \
$(top_srcdir)/m4/nut_check_libopenssl.m4 \
$(top_srcdir)/m4/nut_check_libpowerman.m4 \
$(top_srcdir)/m4/nut_check_libssl.m4 \
$(top_srcdir)/m4/nut_check_libusb.m4 \
$(top_srcdir)/m4/nut_check_libwrap.m4 \
$(top_srcdir)/m4/nut_check_os.m4 \
@ -67,10 +86,15 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES = upssched.conf.sample
CONFIG_CLEAN_FILES = upsmon.conf.sample upssched.conf.sample
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__dist_sysconf_DATA_DIST = upsmon.conf.sample upsd.conf.sample \
upsd.users.sample nut.conf.sample ups.conf.sample \
hosts.conf.sample upsset.conf.sample upsstats.html.sample \
@ -96,6 +120,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(sysconfdir)" "$(DESTDIR)$(sysconfdir)"
DATA = $(dist_sysconf_DATA) $(nodist_sysconf_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@ -104,6 +134,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
ASCIIDOC = @ASCIIDOC@
ASPELL = @ASPELL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@ -130,6 +161,7 @@ DOC_BUILD_LIST = @DOC_BUILD_LIST@
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
DRVPATH = @DRVPATH@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@ -291,7 +323,7 @@ CGIPUB = hosts.conf.sample upsset.conf.sample upsstats.html.sample \
@WITH_CGI_FALSE@CGI_INSTALL =
@WITH_CGI_TRUE@CGI_INSTALL = $(CGIPUB)
dist_sysconf_DATA = $(SECFILES) $(PUBFILES) $(CGI_INSTALL)
nodist_sysconf_DATA = upssched.conf.sample
nodist_sysconf_DATA = upssched.conf.sample upsmon.conf.sample
all: all-am
.SUFFIXES:
@ -325,6 +357,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
upsmon.conf.sample: $(top_builddir)/config.status $(srcdir)/upsmon.conf.sample.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
upssched.conf.sample: $(top_builddir)/config.status $(srcdir)/upssched.conf.sample.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
@ -335,8 +369,11 @@ clean-libtool:
-rm -rf .libs _libs
install-dist_sysconfDATA: $(dist_sysconf_DATA)
@$(NORMAL_INSTALL)
test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
@list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@ -350,13 +387,14 @@ uninstall-dist_sysconfDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(sysconfdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(sysconfdir)" && rm -f $$files
dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir)
install-nodist_sysconfDATA: $(nodist_sysconf_DATA)
@$(NORMAL_INSTALL)
test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
@list='$(nodist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@ -370,9 +408,7 @@ uninstall-nodist_sysconfDATA:
@$(NORMAL_UNINSTALL)
@list='$(nodist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(sysconfdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(sysconfdir)" && rm -f $$files
dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
@ -427,10 +463,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:

View file

@ -55,10 +55,55 @@
# =======================================================================
# CERTFILE <certificate file>
# CERTFILE /usr/local/ups/etc/upsd.pem
#
# When compiled with SSL support, you can enter the certificate file here.
# When compiled with SSL support with OpenSSL backend,
# 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.
#
# See 'docs/security.txt' or the Security chapter of NUT user manual
# for more information on the SSL support in NUT.
# =======================================================================
# CERTPATH <certificate file or directory>
# CERTPATH /usr/local/ups/etc/cert/upsd
#
# When compiled with SSL support with NSS backend,
# you can enter the certificate path here.
# Certificates are stored in a dedicated database (splitted in 3 files).
# Specify the path of the database directory.
#
# See 'docs/security.txt' or the Security chapter of NUT user manual
# for more information on the SSL support in NUT.
# =======================================================================
# CERTIDENT <certificate name> <database password>
# CERTIDENT "my nut server" "MyPasSw0rD"
#
# When compiled with SSL support with NSS backend,
# you can specify the certificate name to retrieve from database to
# authenticate itself and the password
# required to access certificate related private key.
#
# See 'docs/security.txt' or the Security chapter of NUT user manual
# for more information on the SSL support in NUT.
# =======================================================================
# CERTREQUEST <certificate request level>
# CERTREQUEST REQUIRE
#
# When compiled with SSL support with NSS backend and client certificate
# validation (disabled by default, see 'docs/security.txt'),
# you can specify if upsd requests or requires client's' certificates.
# Possible values are :
# - 0 to not request to clients to provide any certificate
# - 1 to require to all clients a certificate
# - 2 to require to all clients a valid certificate
#
# See 'docs/security.txt' or the Security chapter of NUT user manual
# for more information on the SSL support in NUT.

View file

@ -27,7 +27,7 @@
#
# This user should not have write access to upsmon.conf.
#
# RUN_AS_USER nutmon
# RUN_AS_USER nobody
# --------------------------------------------------------------------------
# MONITOR <system> <powervalue> <username> <password> ("master"|"slave")
@ -123,7 +123,7 @@ SHUTDOWNCMD "/sbin/shutdown -h +0"
# NOTIFYFLAG. See NOTIFYFLAG below for more details.
#
# Making this some sort of shell script might not be a bad idea. For more
# information and ideas, see pager.txt in the docs directory.
# information and ideas, see docs/scheduling.txt
#
# Example:
# NOTIFYCMD /usr/local/ups/bin/notifyme
@ -196,7 +196,7 @@ DEADTIME 15
#
# See the shutdown.txt file in the docs subdirectory for more information.
POWERDOWNFLAG /etc/killpower
POWERDOWNFLAG /usr/local/ups/etc/killpower
# --------------------------------------------------------------------------
# NOTIFYMSG - change messages sent by upsmon when certain events occur
@ -297,3 +297,81 @@ NOCOMMWARNTIME 300
# the master will give up waiting for the slave to disconnect.
FINALDELAY 5
# --------------------------------------------------------------------------
# CERTPATH - path to certificates (database directory or directory with CA's)
#
# When compiled with SSL support, you can enter the certificate path here.
#
# With NSS:
# Certificates are stored in a dedicated database (splitted in 3 files).
# Specify the path of the database directory.
#
# CERTPATH /usr/local/ups/etc/cert/upsmon
#
# With OpenSSL:
# Directory containing CA certificates in PEM format, used to verify
# the server certificate presented by the upsd server. The files each
# contain one CA certificate. The files are looked up by the CA subject
# name hash value, which must hence be available.
#
# CERTPATH /usr/ssl/certs
#
# See 'docs/security.txt' or the Security chapter of NUT user manual
# for more information on the SSL support in NUT.
# --------------------------------------------------------------------------
# CERTIDENT - self certificate name and database password
# CERTIDENT <certificate name> <database password>
#
# When compiled with SSL support with NSS, you can specify the certificate
# name to retrieve from database to authenticate itself and the password
# required to access certificate related private key.
#
# CERTIDENT "my nut monitor" "MyPasSw0rD"
#
# See 'docs/security.txt' or the Security chapter of NUT user manual
# for more information on the SSL support in NUT.
# --------------------------------------------------------------------------
# CERTHOST - security properties for an host
# CERTHOST <hostname> <certificate name> <certverify> <forcessl>
#
# When compiled with SSL support with NSS, you can specify security directive
# for each server you can contact.
# Each entry maps server name with the expected certificate name and flags
# indicating if the server certificate is verified and if the connection
# must be secure.
#
# CERTHOST localhost "My nut server" 1 1
#
# See 'docs/security.txt' or the Security chapter of NUT user manual
# for more information on the SSL support in NUT.
# --------------------------------------------------------------------------
# CERTVERIFY - make upsmon verify all connections with certificates
# CERTVERIFY 1
#
# When compiled with SSL support, make upsmon verify all connections with
# certificates.
# Without this, there is no guarantee that the upsd is the right host.
# Enabling this greatly reduces the risk of man in the middle attacks.
# This effectively forces the use of SSL, so don't use this unless
# all of your upsd hosts are ready for SSL and have their certificates
# in order.
# When compiled with NSS support of SSL, can be overriden for host
# specified with a CERTHOST directive.
# --------------------------------------------------------------------------
# FORCESSL - force upsmon to use SSL
# FORCESSL 1
#
# When compiled with SSL, specify that a secured connection must be used
# to communicate with upsd.
# If you don't use 'CERTVERIFY 1', then this will at least make sure
# that nobody can sniff your sessions without a large effort. Setting
# this will make upsmon drop connections if the remote upsd doesn't
# support SSL, so don't use it unless all of them have it running.
# When compiled with NSS support of SSL, can be overriden for host
# specified with a CERTHOST directive.

377
conf/upsmon.conf.sample.in Normal file
View file

@ -0,0 +1,377 @@
# Network UPS Tools: example upsmon configuration
#
# This file contains passwords, so keep it secure.
# --------------------------------------------------------------------------
# RUN_AS_USER <userid>
#
# By default, upsmon splits into two processes. One stays as root and
# waits to run the SHUTDOWNCMD. The other one switches to another userid
# and does everything else.
#
# The default nonprivileged user is set at compile-time with
# 'configure --with-user=...'.
#
# You can override it with '-u <user>' when starting upsmon, or just
# define it here for convenience.
#
# Note: if you plan to use the reload feature, this file (upsmon.conf)
# must be readable by this user! Since it contains passwords, DO NOT
# make it world-readable. Also, do not make it writable by the upsmon
# user, since it creates an opportunity for an attack by changing the
# SHUTDOWNCMD to something malicious.
#
# For best results, you should create a new normal user like "nutmon",
# and make it a member of a "nut" group or similar. Then specify it
# here and grant read access to the upsmon.conf for that group.
#
# This user should not have write access to upsmon.conf.
#
# RUN_AS_USER @RUN_AS_USER@
# --------------------------------------------------------------------------
# MONITOR <system> <powervalue> <username> <password> ("master"|"slave")
#
# List systems you want to monitor. Not all of these may supply power
# to the system running upsmon, but if you want to watch it, it has to
# be in this section.
#
# You must have at least one of these declared.
#
# <system> is a UPS identifier in the form <upsname>@<hostname>[:<port>]
# like ups@localhost, su700@mybox, etc.
#
# Examples:
#
# - "su700@mybox" means a UPS called "su700" on a system called "mybox"
#
# - "fenton@bigbox:5678" is a UPS called "fenton" on a system called
# "bigbox" which runs upsd on port "5678".
#
# The UPS names like "su700" and "fenton" are set in your ups.conf
# in [brackets] which identify a section for a particular driver.
#
# If the ups.conf on host "doghouse" has a section called "snoopy", the
# identifier for it would be "snoopy@doghouse".
#
# <powervalue> is an integer - the number of power supplies that this UPS
# feeds on this system. Most computers only have one power supply, so this
# is normally set to 1. You need a pretty big or special box to have any
# other value here.
#
# You can also set this to 0 for a system that doesn't supply any power,
# but you still want to monitor. Use this when you want to hear about
# changes for a given UPS without shutting down when it goes critical,
# unless <powervalue> is 0.
#
# <username> and <password> must match an entry in that system's
# upsd.users. If your username is "monmaster" and your password is
# "blah", the upsd.users would look like this:
#
# [monmaster]
# password = blah
# upsmon master (or slave)
#
# "master" means this system will shutdown last, allowing the slaves
# time to shutdown first.
#
# "slave" means this system shuts down immediately when power goes critical.
#
# Examples:
#
# MONITOR myups@bigserver 1 monmaster blah master
# MONITOR su700@server.example.com 1 upsmon secretpass slave
# MONITOR myups@localhost 1 upsmon pass master (or slave)
# --------------------------------------------------------------------------
# MINSUPPLIES <num>
#
# Give the number of power supplies that must be receiving power to keep
# this system running. Most systems have one power supply, so you would
# put "1" in this field.
#
# Large/expensive server type systems usually have more, and can run with
# a few missing. The HP NetServer LH4 can run with 2 out of 4, for example,
# so you'd set that to 2. The idea is to keep the box running as long
# as possible, right?
#
# Obviously you have to put the redundant supplies on different UPS circuits
# for this to make sense! See big-servers.txt in the docs subdirectory
# for more information and ideas on how to use this feature.
MINSUPPLIES 1
# --------------------------------------------------------------------------
# SHUTDOWNCMD "<command>"
#
# upsmon runs this command when the system needs to be brought down.
#
# This should work just about everywhere ... if it doesn't, well, change it.
SHUTDOWNCMD "/sbin/shutdown -h +0"
# --------------------------------------------------------------------------
# NOTIFYCMD <command>
#
# upsmon calls this to send messages when things happen
#
# This command is called with the full text of the message as one argument.
# The environment string NOTIFYTYPE will contain the type string of
# whatever caused this event to happen.
#
# Note that this is only called for NOTIFY events that have EXEC set with
# NOTIFYFLAG. See NOTIFYFLAG below for more details.
#
# Making this some sort of shell script might not be a bad idea. For more
# information and ideas, see docs/scheduling.txt
#
# Example:
# NOTIFYCMD @BINDIR@/notifyme
# --------------------------------------------------------------------------
# POLLFREQ <n>
#
# Polling frequency for normal activities, measured in seconds.
#
# Adjust this to keep upsmon from flooding your network, but don't make
# it too high or it may miss certain short-lived power events.
POLLFREQ 5
# --------------------------------------------------------------------------
# POLLFREQALERT <n>
#
# Polling frequency in seconds while UPS on battery.
#
# You can make this number lower than POLLFREQ, which will make updates
# faster when any UPS is running on battery. This is a good way to tune
# network load if you have a lot of these things running.
#
# The default is 5 seconds for both this and POLLFREQ.
POLLFREQALERT 5
# --------------------------------------------------------------------------
# HOSTSYNC - How long upsmon will wait before giving up on another upsmon
#
# The master upsmon process uses this number when waiting for slaves to
# disconnect once it has set the forced shutdown (FSD) flag. If they
# don't disconnect after this many seconds, it goes on without them.
#
# Similarly, upsmon slave processes wait up to this interval for the
# master upsmon to set FSD when a UPS they are monitoring goes critical -
# that is, on battery and low battery. If the master doesn't do its job,
# the slaves will shut down anyway to avoid damage to the file systems.
#
# This "wait for FSD" is done to avoid races where the status changes
# to critical and back between polls by the master.
HOSTSYNC 15
# --------------------------------------------------------------------------
# DEADTIME - Interval to wait before declaring a stale ups "dead"
#
# upsmon requires a UPS to provide status information every few seconds
# (see POLLFREQ and POLLFREQALERT) to keep things updated. If the status
# fetch fails, the UPS is marked stale. If it stays stale for more than
# DEADTIME seconds, the UPS is marked dead.
#
# A dead UPS that was last known to be on battery is assumed to have gone
# to a low battery condition. This may force a shutdown if it is providing
# a critical amount of power to your system.
#
# Note: DEADTIME should be a multiple of POLLFREQ and POLLFREQALERT.
# Otherwise you'll have "dead" UPSes simply because upsmon isn't polling
# them quickly enough. Rule of thumb: take the larger of the two
# POLLFREQ values, and multiply by 3.
DEADTIME 15
# --------------------------------------------------------------------------
# POWERDOWNFLAG - Flag file for forcing UPS shutdown on the master system
#
# upsmon will create a file with this name in master mode when it's time
# to shut down the load. You should check for this file's existence in
# your shutdown scripts and run 'upsdrvctl shutdown' if it exists.
#
# See the shutdown.txt file in the docs subdirectory for more information.
POWERDOWNFLAG @CONFPATH@/killpower
# --------------------------------------------------------------------------
# NOTIFYMSG - change messages sent by upsmon when certain events occur
#
# You can change the default messages to something else if you like.
#
# NOTIFYMSG <notify type> "message"
#
# NOTIFYMSG ONLINE "UPS %s on line power"
# NOTIFYMSG ONBATT "UPS %s on battery"
# NOTIFYMSG LOWBATT "UPS %s battery is low"
# NOTIFYMSG FSD "UPS %s: forced shutdown in progress"
# NOTIFYMSG COMMOK "Communications with UPS %s established"
# NOTIFYMSG COMMBAD "Communications with UPS %s lost"
# NOTIFYMSG SHUTDOWN "Auto logout and shutdown proceeding"
# NOTIFYMSG REPLBATT "UPS %s battery needs to be replaced"
# NOTIFYMSG NOCOMM "UPS %s is unavailable"
# NOTIFYMSG NOPARENT "upsmon parent process died - shutdown impossible"
#
# Note that %s is replaced with the identifier of the UPS in question.
#
# Possible values for <notify type>:
#
# ONLINE : UPS is back online
# ONBATT : UPS is on battery
# LOWBATT : UPS has a low battery (if also on battery, it's "critical")
# FSD : UPS is being shutdown by the master (FSD = "Forced Shutdown")
# COMMOK : Communications established with the UPS
# COMMBAD : Communications lost to the UPS
# SHUTDOWN : The system is being shutdown
# REPLBATT : The UPS battery is bad and needs to be replaced
# NOCOMM : A UPS is unavailable (can't be contacted for monitoring)
# NOPARENT : The process that shuts down the system has died (shutdown impossible)
# --------------------------------------------------------------------------
# NOTIFYFLAG - change behavior of upsmon when NOTIFY events occur
#
# By default, upsmon sends walls (global messages to all logged in users)
# and writes to the syslog when things happen. You can change this.
#
# NOTIFYFLAG <notify type> <flag>[+<flag>][+<flag>] ...
#
# NOTIFYFLAG ONLINE SYSLOG+WALL
# NOTIFYFLAG ONBATT SYSLOG+WALL
# NOTIFYFLAG LOWBATT SYSLOG+WALL
# NOTIFYFLAG FSD SYSLOG+WALL
# NOTIFYFLAG COMMOK SYSLOG+WALL
# NOTIFYFLAG COMMBAD SYSLOG+WALL
# NOTIFYFLAG SHUTDOWN SYSLOG+WALL
# NOTIFYFLAG REPLBATT SYSLOG+WALL
# NOTIFYFLAG NOCOMM SYSLOG+WALL
# NOTIFYFLAG NOPARENT SYSLOG+WALL
#
# Possible values for the flags:
#
# SYSLOG - Write the message in the syslog
# WALL - Write the message to all users on the system
# EXEC - Execute NOTIFYCMD (see above) with the message
# IGNORE - Don't do anything
#
# If you use IGNORE, don't use any other flags on the same line.
# --------------------------------------------------------------------------
# RBWARNTIME - replace battery warning time in seconds
#
# upsmon will normally warn you about a battery that needs to be replaced
# every 43200 seconds, which is 12 hours. It does this by triggering a
# NOTIFY_REPLBATT which is then handled by the usual notify structure
# you've defined above.
#
# If this number is not to your liking, override it here.
RBWARNTIME 43200
# --------------------------------------------------------------------------
# NOCOMMWARNTIME - no communications warning time in seconds
#
# upsmon will let you know through the usual notify system if it can't
# talk to any of the UPS entries that are defined in this file. It will
# trigger a NOTIFY_NOCOMM by default every 300 seconds unless you
# change the interval with this directive.
NOCOMMWARNTIME 300
# --------------------------------------------------------------------------
# FINALDELAY - last sleep interval before shutting down the system
#
# On a master, upsmon will wait this long after sending the NOTIFY_SHUTDOWN
# before executing your SHUTDOWNCMD. If you need to do something in between
# those events, increase this number. Remember, at this point your UPS is
# almost depleted, so don't make this too high.
#
# Alternatively, you can set this very low so you don't wait around when
# it's time to shut down. Some UPSes don't give much warning for low
# battery and will require a value of 0 here for a safe shutdown.
#
# Note: If FINALDELAY on the slave is greater than HOSTSYNC on the master,
# the master will give up waiting for the slave to disconnect.
FINALDELAY 5
# --------------------------------------------------------------------------
# CERTPATH - path to certificates (database directory or directory with CA's)
#
# When compiled with SSL support, you can enter the certificate path here.
#
# With NSS:
# Certificates are stored in a dedicated database (splitted in 3 files).
# Specify the path of the database directory.
#
# CERTPATH @CONFPATH@/cert/upsmon
#
# With OpenSSL:
# Directory containing CA certificates in PEM format, used to verify
# the server certificate presented by the upsd server. The files each
# contain one CA certificate. The files are looked up by the CA subject
# name hash value, which must hence be available.
#
# CERTPATH /usr/ssl/certs
#
# See 'docs/security.txt' or the Security chapter of NUT user manual
# for more information on the SSL support in NUT.
# --------------------------------------------------------------------------
# CERTIDENT - self certificate name and database password
# CERTIDENT <certificate name> <database password>
#
# When compiled with SSL support with NSS, you can specify the certificate
# name to retrieve from database to authenticate itself and the password
# required to access certificate related private key.
#
# CERTIDENT "my nut monitor" "MyPasSw0rD"
#
# See 'docs/security.txt' or the Security chapter of NUT user manual
# for more information on the SSL support in NUT.
# --------------------------------------------------------------------------
# CERTHOST - security properties for an host
# CERTHOST <hostname> <certificate name> <certverify> <forcessl>
#
# When compiled with SSL support with NSS, you can specify security directive
# for each server you can contact.
# Each entry maps server name with the expected certificate name and flags
# indicating if the server certificate is verified and if the connection
# must be secure.
#
# CERTHOST localhost "My nut server" 1 1
#
# See 'docs/security.txt' or the Security chapter of NUT user manual
# for more information on the SSL support in NUT.
# --------------------------------------------------------------------------
# CERTVERIFY - make upsmon verify all connections with certificates
# CERTVERIFY 1
#
# When compiled with SSL support, make upsmon verify all connections with
# certificates.
# Without this, there is no guarantee that the upsd is the right host.
# Enabling this greatly reduces the risk of man in the middle attacks.
# This effectively forces the use of SSL, so don't use this unless
# all of your upsd hosts are ready for SSL and have their certificates
# in order.
# When compiled with NSS support of SSL, can be overriden for host
# specified with a CERTHOST directive.
# --------------------------------------------------------------------------
# FORCESSL - force upsmon to use SSL
# FORCESSL 1
#
# When compiled with SSL, specify that a secured connection must be used
# to communicate with upsd.
# If you don't use 'CERTVERIFY 1', then this will at least make sure
# that nobody can sniff your sessions without a large effort. Setting
# this will make upsmon drop connections if the remote upsd doesn't
# support SSL, so don't use it unless all of them have it running.
# When compiled with NSS support of SSL, can be overriden for host
# specified with a CERTHOST directive.

49
config.guess vendored
View file

@ -2,9 +2,9 @@
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
# 2011, 2012 Free Software Foundation, Inc.
timestamp='2011-05-11'
timestamp='2012-02-10'
# 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
@ -17,9 +17,7 @@ timestamp='2011-05-11'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -57,8 +55,8 @@ GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
Software Foundation, Inc.
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -145,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@ -792,13 +790,12 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
@ -807,6 +804,9 @@ EOF
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
@ -861,6 +861,13 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@ -895,13 +902,16 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu
echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
@ -943,7 +953,7 @@ EOF
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
@ -978,13 +988,13 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-tilera-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@ -1315,6 +1325,9 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2

74
config.sub vendored
View file

@ -2,9 +2,9 @@
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
# 2011, 2012 Free Software Foundation, Inc.
timestamp='2011-03-23'
timestamp='2012-04-18'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -21,9 +21,7 @@ timestamp='2011-03-23'
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@ -76,8 +74,8 @@ version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
Software Foundation, Inc.
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -132,6 +130,10 @@ case $maybe_os in
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
android-linux)
os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@ -223,6 +225,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*178)
os=-lynxos178
;;
-lynx*5)
os=-lynxos5
;;
-lynx*)
os=-lynxos
;;
@ -247,17 +255,22 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
@ -291,7 +304,7 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
| rx \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
@ -300,7 +313,7 @@ case $basic_machine in
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
@ -315,8 +328,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@ -329,7 +341,10 @@ case $basic_machine in
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
os=-none
;;
xscaleeb)
basic_machine=armeb-unknown
;;
@ -352,11 +367,13 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
@ -365,8 +382,10 @@ case $basic_machine in
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
@ -400,7 +419,7 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| romp-* | rs6000-* | rx-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
@ -408,10 +427,11 @@ case $basic_machine in
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile-* | tilegx-* \
| tile*-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@ -711,7 +731,6 @@ case $basic_machine in
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
@ -808,10 +827,18 @@ case $basic_machine in
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i386-pc
os=-msys
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
nacl)
basic_machine=le32-unknown
os=-nacl
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
@ -1120,13 +1147,8 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
# This must be matched before tile*.
tilegx*)
basic_machine=tilegx-unknown
os=-linux-gnu
;;
tile*)
basic_machine=tile-unknown
basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
@ -1336,7 +1358,7 @@ case $os in
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
@ -1521,6 +1543,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
hexagon-*)
os=-elf
;;
tic54x-*)
os=-coff
;;
@ -1548,9 +1573,6 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
m68*-cisco)
os=-aout

1296
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -2,8 +2,8 @@ dnl +------------------------------------------------------------------+
dnl | Network UPS Tools: configure.in |
dnl +------------------------------------------------------------------+
dnl NUT version number is defined here and *only* here (no more include/version)
AC_INIT(nut, 2.6.5)
dnl NUT version number is defined here, with a Git suffix in include/nut_version.h
AC_INIT(nut, 2.7.1)
AC_CONFIG_SRCDIR(server/upsd.c)
AC_CONFIG_MACRO_DIR([m4])
echo "Network UPS Tools version ${PACKAGE_VERSION}"
@ -136,6 +136,14 @@ then
fi
case ${target_os} in
solaris2* )
dnl On Solaris, this allows errno to use thread local storage
CFLAGS="${CFLAGS} -D_REENTRANT"
;;
aix* )
dnl On AIX, this allows errno to use thread local storage
CFLAGS="${CFLAGS} -D_REENTRANT"
;;
hpux11* )
dnl It seems like the thread safe string functions will not be included
dnl on 64 bit HP-UX unless we define _REENTRANT
@ -261,16 +269,19 @@ dnl ----------------------------------------------------------------------
dnl additional USB-related checks
dnl Solaris 10/11 USB handling (need librt and libusb runtime path)
dnl HPUX, since v11, needs an explicit activation of pthreads
case ${target_os} in
solaris2.1* )
echo Checking for Solaris 10 / 11 specific configuration for usb drivers
AC_SEARCH_LIBS(nanosleep, rt)
LIBUSB_LIBS="-R/usr/sfw/lib ${LIBUSB_LIBS}"
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 reconnection
AC_DEFINE(SUN_LIBUSB, 1, [Define to 1 for Sun version of the libusb.])
SUN_LIBUSB=1
;;
hpux11*)
CFLAGS="${CFLAGS} -lpthread"
esac
@ -449,26 +460,56 @@ NUT_REPORT_FEATURE([build Mac OS X meta-driver],
[WITH_MACOSX], [Define to enable Mac OS X meta-driver])
dnl ----------------------------------------------------------------------
dnl Check for --with-ssl
dnl Check for with-ssl, and --with-nss or --with-openssl
dnl Only one can be enabled at a time, with a preference for OpenSSL
dnl if both are available
NUT_ARG_WITH([ssl], [enable SSL development code], [auto])
nut_ssl_lib=""
NUT_ARG_WITH([ssl], [enable SSL support (either NSS or OpenSSL)], [auto])
NUT_ARG_WITH([nss], [enable SSL support using Mozilla NSS], [auto])
NUT_ARG_WITH([openssl], [enable SSL support using OpenSSL], [auto])
dnl ${nut_with_ssl}: any value except "yes" or "no" is treated as "auto".
if test "${nut_with_ssl}" != "no"; then
dnl check for libssl compiler flags
NUT_CHECK_LIBSSL
dnl check if either NSS or OpenSSL was explicitly requested
if test "${nut_with_nss}" = "yes"; then
NUT_CHECK_LIBNSS
if test "${nut_have_libnss}" != "yes"; then
AC_MSG_ERROR(["Mozilla NSS not found, required for SSL support"])
fi
elif test "${nut_with_openssl}" = "yes"; then
NUT_CHECK_LIBOPENSSL
if test "${nut_have_openssl}" != "yes"; then
AC_MSG_ERROR(["OpenSSL not found, required for SSL support"])
fi
else
dnl Prefer OpenSSL over NSS otherwise
NUT_CHECK_LIBOPENSSL
if test "${nut_have_openssl}" != "yes"; then
NUT_CHECK_LIBNSS
if test "${nut_have_libnss}" != "yes"; then
dnl Only abort if SSL has been explicitly requested by the user
if test "${nut_with_ssl}" = "yes"; then
AC_MSG_ERROR(["Mozilla NSS and OpenSSL neither found, but are needed for the requested SSL support"])
else
AC_MSG_WARN(["Mozilla NSS and OpenSSL neither found, required for SSL support"])
fi
nut_with_ssl="no"
else
nut_with_nss="${nut_have_libnss}"
fi
else
nut_with_openssl="${nut_have_openssl}"
fi
fi
fi
if test "${nut_with_ssl}" = "yes" -a "${nut_have_libssl}" != "yes"; then
AC_MSG_ERROR(["OpenSSL not found, required for SSL support"])
fi
AM_CONDITIONAL(WITH_NSS, test "${nut_with_nss}" = "yes")
AM_CONDITIONAL(WITH_OPENSSL, test "${nut_with_openssl}" = "yes")
if test "${nut_with_ssl}" != "no"; then
nut_with_ssl="${nut_have_libssl}"
fi
NUT_REPORT_FEATURE([enable SSL development code], [${nut_with_ssl}], [],
[WITH_SSL], [Define to enable SSL development code])
NUT_REPORT_FEATURE([enable SSL support], [${nut_with_ssl}], [${nut_ssl_lib}],
[WITH_SSL], [Define to enable SSL])
dnl ----------------------------------------------------------------------
dnl Check for --with-wrap
@ -1054,6 +1095,10 @@ AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])
AM_CONDITIONAL([MANUALUPDATE], [test "x$ASCIIDOC" != "xnone"])
AC_PATH_PROGS([A2X], [a2x], [none])
dnl check for spell checking deps
AC_PATH_PROGS([ASPELL], [aspell], [none])
AM_CONDITIONAL([HAVE_ASPELL], [test "x$ASPELL" != "xnone"])
dnl expand ${sysconfdir} and write it out
conftemp="${sysconfdir}"
eval conftemp=\"${conftemp}\"
@ -1121,6 +1166,7 @@ AC_SUBST(PIDPATH)
AC_SUBST(STATEPATH)
AC_SUBST(CONFPATH)
AC_SUBST(BINDIR)
AC_SUBST(DRVPATH)
AC_SUBST(SBINDIR)
AC_SUBST(PORT)
AC_SUBST(RUN_AS_USER)
@ -1140,6 +1186,7 @@ AC_OUTPUT([
clients/Makefile
common/Makefile
conf/Makefile
conf/upsmon.conf.sample
conf/upssched.conf.sample
data/html/header.html
data/html/Makefile
@ -1152,6 +1199,7 @@ AC_OUTPUT([
include/Makefile
lib/libupsclient-config
lib/libupsclient.pc
lib/libnutclient.pc
lib/libnutscan.pc
lib/Makefile
scripts/augeas/Makefile
@ -1169,13 +1217,18 @@ AC_OUTPUT([
scripts/hotplug/Makefile
scripts/hotplug/libhidups
scripts/HP-UX/nut.psf
scripts/java/Makefile
scripts/HP-UX/postinstall
scripts/python/Makefile
scripts/systemd/Makefile
scripts/systemd/nut-driver.service
scripts/systemd/nut-monitor.service
scripts/systemd/nut-server.service
scripts/systemd/nutshutdown
scripts/Solaris/Makefile
scripts/Solaris/pkginfo
scripts/Solaris/postinstall
scripts/Solaris/preremove
scripts/Solaris/nut
scripts/udev/Makefile
scripts/udev/nut-ipmipsu.rules
scripts/udev/nut-usbups.rules

View file

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -18,6 +18,23 @@
# Network UPS Tools: data
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -54,8 +71,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
$(top_srcdir)/m4/nut_check_libltdl.m4 \
$(top_srcdir)/m4/nut_check_libneon.m4 \
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
$(top_srcdir)/m4/nut_check_libnss.m4 \
$(top_srcdir)/m4/nut_check_libopenssl.m4 \
$(top_srcdir)/m4/nut_check_libpowerman.m4 \
$(top_srcdir)/m4/nut_check_libssl.m4 \
$(top_srcdir)/m4/nut_check_libusb.m4 \
$(top_srcdir)/m4/nut_check_libwrap.m4 \
$(top_srcdir)/m4/nut_check_os.m4 \
@ -78,6 +96,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@ -99,6 +122,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(datadir)" "$(DESTDIR)$(datadir)"
DATA = $(dist_data_DATA) $(nodist_data_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
@ -140,6 +169,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
ASCIIDOC = @ASCIIDOC@
ASPELL = @ASPELL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@ -166,6 +196,7 @@ DOC_BUILD_LIST = @DOC_BUILD_LIST@
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
DRVPATH = @DRVPATH@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@ -365,8 +396,11 @@ clean-libtool:
-rm -rf .libs _libs
install-dist_dataDATA: $(dist_data_DATA)
@$(NORMAL_INSTALL)
test -z "$(datadir)" || $(MKDIR_P) "$(DESTDIR)$(datadir)"
@list='$(dist_data_DATA)'; test -n "$(datadir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(datadir)'"; \
$(MKDIR_P) "$(DESTDIR)$(datadir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@ -380,13 +414,14 @@ uninstall-dist_dataDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_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
dir='$(DESTDIR)$(datadir)'; $(am__uninstall_files_from_dir)
install-nodist_dataDATA: $(nodist_data_DATA)
@$(NORMAL_INSTALL)
test -z "$(datadir)" || $(MKDIR_P) "$(DESTDIR)$(datadir)"
@list='$(nodist_data_DATA)'; test -n "$(datadir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(datadir)'"; \
$(MKDIR_P) "$(DESTDIR)$(datadir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@ -400,9 +435,7 @@ 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
dir='$(DESTDIR)$(datadir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@ -571,13 +604,10 @@ distdir: $(DISTFILES)
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 \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@ -615,10 +645,15 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:

View file

@ -139,6 +139,8 @@ VARDESC driver.name "Driver name"
VARDESC driver.version "Driver version - NUT release"
VARDESC driver.version.internal "Internal driver version"
VARDESC device.part "Device Part Number"
# FIXME: driver.parameter and driver.flag can have many possible members
#
# VARDESC driver.parameter.[[:alpha:]]+ "Driver parameter: <name>"
@ -162,6 +164,7 @@ CMDDESC test.battery.start "Start a battery test"
CMDDESC test.battery.start.quick "Start a quick battery test"
CMDDESC test.battery.start.deep "Start a deep battery test"
CMDDESC test.battery.stop "Stop the battery test"
CMDDESC test.system.start "Start a system test"
CMDDESC calibrate.start "Start run time calibration"
CMDDESC calibrate.stop "Stop run time calibration"
CMDDESC bypass.start "Put the UPS in bypass mode"

View file

@ -51,6 +51,7 @@
"APC" "ups" "1" "Back-UPS Pro" "" "apcsmart"
"APC" "ups" "1" "Matrix-UPS" "" "apcsmart"
"APC" "ups" "1" "Smart-UPS" "" "apcsmart"
"APC" "ups" "1" "Smart-UPS SMT/SMX/SURTD" "Microlink models with RJ45 socket - they *require* AP9620 SmartSlot expansion card and smart cable" "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"
@ -66,6 +67,7 @@
"APC" "ups" "1" "Back-UPS RS 500" "custom non-USB cable" "genericups upstype=20"
"APC" "ups" "3" "Smart-UPS RT XL" "AP9618 SNMP monitoring card" "snmp-ups"
"APC" "ups" "3" "(various)" "AP9618 SNMP monitoring card" "snmp-ups"
"APC" "ups" "3" "(various)" "AP9630 SNMP monitoring card" "snmp-ups privProtocol=AES"
"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)"
@ -75,6 +77,7 @@
"Apollo" "ups" "1" "1000A" "" "genericups upstype=4"
"Apollo" "ups" "1" "1000F" "" "genericups upstype=4"
"Apollo" "ups" "2" "850VA" "" "blazer_usb"
"Appro" "pdu" "1" "SWPDU" "48 outlets" "powerman-pdu (experimental)"
@ -95,6 +98,13 @@
"ATEK" "ups" "2" "Defensor 10K Tower / Rack" "USB" "blazer_usb"
"Atlantis Land" "ups" "2" "A03-P826" "" "blazer_ser"
"Atlantis Land" "ups" "2" "A03-P551" "USB" "blazer_usb langid_fix=0x0409" # http://www.atlantisland.it/pub/prodotti.php?famiglia=1&l1=7&l2=24&articolo=QTAzLVA1NTE=
"Atlantis Land" "ups" "2" "LinePower 1151 (A03-OP1151)" "Serial" "nutdrv_qx"
"Atlantis Land" "ups" "2" "LinePower 1151 (A03-OP1151)" "USB" "nutdrv_qx"
"Atlantis Land" "ups" "2" "(various)" "Serial" "nutdrv_qx"
"Atlantis Land" "ups" "2" "(various)" "USB" "nutdrv_qx"
"Aviem Systems" "ups" "2" "Aviem Power RT 1000-3000VA" "" "blazer_ser"
"Baytech" "pdu" "1" "RPC3" "8 outlets" "powerman-pdu (experimental)"
"Baytech" "pdu" "1" "RPC3-20NC" "8 outlets" "powerman-pdu (experimental)"
@ -159,26 +169,27 @@
"COVER ENERGY SA" "ups" "2" "COVER PRM 1K/2K/3K/6K/10K EC" "" "blazer_usb"
"COVER ENERGY SA" "ups" "2" "COVER PRM 6K/10K PR" "" "blazer_usb"
"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" "CPS320AVR" "" "powerpanel"
"Cyber Power Systems" "ups" "1" "CPS500AVR" "" "powerpanel"
"Cyber Power Systems" "ups" "1" "CPS650AVR" "" "powerpanel"
"Cyber Power Systems" "ups" "1" "CPS700AVR" "" "powerpanel"
"Cyber Power Systems" "ups" "1" "CPS800AVR" "" "powerpanel"
"Cyber Power Systems" "ups" "1" "CPS850AVR" "" "powerpanel"
"Cyber Power Systems" "ups" "1" "CPS900AVR" "" "powerpanel" # http://www.cyberpowersystems.com/products/ups-systems/other-ups/CPS900AVR.html
"Cyber Power Systems" "ups" "1" "CPS1250AVR" "" "powerpanel"
"Cyber Power Systems" "ups" "1" "CPS1500AVR" "" "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" "CPS1100AVR" "" "powerpanel"
"Cyber Power Systems" "ups" "1" "CPS1200AVR" "" "powerpanel"
"Cyber Power Systems" "ups" "1" "CPS1500AVR-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" "OL3000RMXL2U" "" "powerpanel"
"Cyber Power Systems" "ups" "2" "CPS685AVR" "USB" "usbhid-ups"
"Cyber Power Systems" "ups" "2" "CPS800AVR" "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"
@ -187,6 +198,7 @@
"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" "CP900AVR" "USB" "usbhid-ups"
"Cyber Power Systems" "ups" "2" "CP1000AVRLCD" "USB" "usbhid-ups"
"Cyber Power Systems" "ups" "2" "CP1350AVRLCD" "USB" "usbhid-ups"
"Cyber Power Systems" "ups" "2" "CP1500AVRLCD" "USB" "usbhid-ups"
@ -251,6 +263,10 @@
"Eaton" "ups" "5" "MX 5/8/10/15/20 kVA" "USB port" "usbhid-ups"
"Eaton" "ups" "5" "5 PX" "USB port" "usbhid-ups"
"Eaton" "ups" "5" "Nova AVR 625/1250" "USB" "usbhid-ups"
"Eaton" "ups" "5" "5S" "USB port" "usbhid-ups"
"Eaton" "ups" "5" "5SC" "USB port" "usbhid-ups"
"Eaton" "ups" "5" "5P" "USB port" "usbhid-ups"
"Eaton" "ups" "5" "9SX" "USB port" "usbhid-ups"
"Eaton" "ups" "5" "Ellipse ASR USBS 600/750/1000/1500 VA" "Serial cable" "mge-shut or oldmge-shut"
"Eaton" "ups" "5" "Ellipse MAX USBS 600/850/1100/1500 VA" "Serial cable" "mge-shut or oldmge-shut"
"Eaton" "ups" "5" "Evolution 650/850/1150/1550/2000 VA" "Serial port" "mge-shut or oldmge-shut"
@ -262,6 +278,9 @@
"Eaton" "ups" "5" "5 PX" "Serial port" "mge-shut or oldmge-shut"
"Eaton" "ups" "5" "EX RT 1:1 7/11 kVA" "" "mge-shut or oldmge-shut"
"Eaton" "ups" "5" "EX RT 3:1 5/7/11 kVA" "" "mge-shut or oldmge-shut"
"Eaton" "ups" "5" "5SC" "Serial port" "mge-shut or oldmge-shut"
"Eaton" "ups" "5" "5P" "Serial port" "mge-shut or oldmge-shut"
"Eaton" "ups" "5" "9SX" "Serial port" "mge-shut or oldmge-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"
@ -283,6 +302,7 @@
"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"
"Eaton" "ups" "5" "Management Card Contact" "Config 3 - Cable 66033" "genericups upstype=7"
"Effekta" "ups" "2" "MI/MT/MH" "2502 cable" "blazer_ser"
"Effekta" "ups" "2" "RM2000MH" "" "blazer_ser"
@ -321,7 +341,13 @@
"Fiskars" "ups" "4" "PowerServer 30" "" "upscode2"
"Fiskars" "ups" "4" "9200" "UPS Information Unit" "upscode2"
"Flight Technic & International (FTUPS)" "ups" "2" "Smart On Line UPS 1KVA" "Serial" "nutdrv_qx"
"Flight Technic & International (FTUPS)" "ups" "2" "Smart On Line UPS 1KVA" "USB" "nutdrv_qx"
"Flight Technic & International (FTUPS)" "ups" "2" "(various)" "Serial" "nutdrv_qx"
"Flight Technic & International (FTUPS)" "ups" "2" "(various)" "USB" "nutdrv_qx"
"Forza Power Technologies" "ups" "2" "SL-1001" "USB" "blazer_usb"
"Forza Power Technologies" "ups" "2" "FX-1500LCD" "USB" "blazer_usb"
"FSP" "ups" "2" "EP650" "USB" "blazer_usb"
@ -435,6 +461,8 @@
"LNXI" "pdu" "1" "Icebox" "10 outlets" "powerman-pdu (experimental)"
"Lyonn" "ups" "2" "CTB-1200" "" "blazer_usb"
"Masterguard" "ups" "1" "(various)" "" "masterguard"
"Maxxtro" "ups" "2" "UPS 600 VA" "serial port" "blazer_ser"
@ -640,6 +668,8 @@
"Microsol" "ups" "5" "Rhino 10.0" "10000VA" "rhino"
"Microsol" "ups" "5" "Rhino 20.0" "20000VA" "rhino"
"Minibox" "ups" "5" "openUPS Intelligent UPS" "USB port" "usbhid-ups"
"Mustek" "ups" "2" "Powermust" "400VA Plus" "blazer_ser"
"Mustek" "ups" "2" "Powermust" "600VA Plus" "blazer_ser"
"Mustek" "ups" "2" "Powermust" "800VA Pro" "blazer_ser"
@ -777,7 +807,42 @@
"Riello" "ups" "3" "Riello Sentinel SDL 6000-7" "Netman Plus 102 SNMP Card" "snmp-ups"
"Riello" "ups" "3" "Riello Sentinel Dual SDH 1000-7" "Netman Plus 102 SNMP Card" "snmp-ups"
"Riello" "ups" "5" "IDG 400/600/800/1200/1600" "" "riello_usb"
"Riello" "ups" "5" "IPG 600/800" "" "riello_usb"
"Riello" "ups" "5" "WPG 400/600/800" "" "riello_usb"
"Riello" "ups" "5" "NPW 600/800/1000/1500/2000" "" "riello_usb"
"Riello" "ups" "5" "NDG 800/1000/1500/2000" "" "riello_usb"
"Riello" "ups" "5" "DVT 500/800/1100/1500/2000" "" "riello_usb"
"Riello" "ups" "5" "DVR 500/800/1100" "" "riello_usb"
"Riello" "ups" "5" "DVD 1500/2200/3000" "" "riello_usb"
"Riello" "ups" "5" "VST 800/1100/1500/2000" "" "riello_usb"
"Riello" "ups" "5" "VSD 1100/1500/2200/3000" "" "riello_usb"
"Riello" "ups" "5" "SEP 700/1000/1500/2200/3000" "" "riello_usb"
"Riello" "ups" "5" "SDH 1000/1500/2200/3000" "" "riello_usb"
"Riello" "ups" "5" "SDL 3300/4000/5000/6000/6500/8000/10000" "" "riello_usb"
"Riello" "ups" "5" "SPW" "" "riello_usb"
"Riello" "ups" "5" "SPT" "" "riello_usb"
"Riello" "ups" "5" "NDG 800/1000/1500/2000" "" "riello_ser"
"Riello" "ups" "5" "DVT 500/800/1100/1500/2000" "" "riello_ser"
"Riello" "ups" "5" "DVR 500/800/1100" "" "riello_ser"
"Riello" "ups" "5" "DVD 1500/2200/3000" "" "riello_ser"
"Riello" "ups" "5" "VST 800/1100/1500/2000" "" "riello_ser"
"Riello" "ups" "5" "VSD 1100/1500/2200/3000" "" "riello_ser"
"Riello" "ups" "5" "SEP 700/1000/1500/2200/3000" "" "riello_ser"
"Riello" "ups" "5" "SDH 1000/1500/2200/3000" "" "riello_ser"
"Riello" "ups" "5" "SDL 3300/4000/5000/6000/6500/8000/10000" "" "riello_ser"
"Riello" "ups" "5" "SPW" "" "riello_ser"
"Riello" "ups" "5" "SPT" "" "riello_ser"
"Riello" "ups" "5" "MCT" "" "riello_ser"
"Riello" "ups" "5" "MST" "" "riello_ser"
"Riello" "ups" "5" "MCM" "" "riello_ser"
"Riello" "ups" "5" "MCT" "" "riello_ser"
"Riello" "ups" "5" "MHT" "" "riello_ser"
"Riello" "ups" "5" "MPT" "" "riello_ser"
"Riello" "ups" "5" "MPM" "" "riello_ser"
"Riello" "ups" "3" "(various)" "Netman Plus 101 SNMP Box" "snmp-ups"
"Riello" "ups" "3" "(various)" "Netman Plus 102 SNMP Card" "snmp-ups"
"Riello" "ups" "3" "(various)" "Netman Plus 202 SNMP Card" "snmp-ups"
"Rocketfish" "ups" "2" "RF-1000VA / RF-1025VA" "" "usbhid-ups"
@ -797,6 +862,7 @@
"Socomec Sicon" "ups" "2" "NeTYS-PE 600VA" "" "blazer_ser"
"Socomec Sicon" "ups" "1" "Egys" "420 VA" "powercom"
"Socomec Sicon" "ups" "3" "MASTERYS 3/3 SYSTEM 60 kVA" "Net Vision v5.05 SNMP card" "snmp-ups (experimental)"
"Socomec Sicon" "ups" "3" "NETYS RT 1/1" "Net Vision SNMP card" "snmp-ups (experimental)"
"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"
@ -806,6 +872,8 @@
"SquareOne Power" "ups" "2" "QP1000" "" "blazer_ser"
"StarPower" "ups" "1" "PCF-800VA" "USB" "richcomm_usb" # http://www.sako.com.cn/products01.asp?Id=29&proid=53
"Sun" "pdu" "1" "ILOM Management Module" "1 outlet" "powerman-pdu (experimental)"
"SuperPower" "ups" "2" "HP360, Hope-550" "" "blazer_ser"
@ -825,28 +893,132 @@
"Tecnoware" "ups" "2" "Easy Power 1200" "" "blazer_ser"
"Tecnoware" "ups" "2" "UPS ERA LCD 0.65" "" "blazer_usb langid_fix=0x409"
"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" "OMNISMART500" "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" "Smart1000LCD" "USB" "usbhid-ups"
"Tripp-Lite" "ups" "2" "Smart1500LCD" "USB" "usbhid-ups"
"Tripp-Lite" "ups" "2" "smart2200RMXL2U" "USB, newer models" "usbhid-ups"
"Tripp Lite" "ups" "1" "INTERNETOFFICE700" "USB (older; product ID: 0001)" "tripplite_usb"
"Tripp Lite" "ups" "2" "OMNIVS1000" "USB (older; product ID: 0001)" "tripplite_usb"
"Tripp Lite" "ups" "1" "OMNIVS1500XL" "USB" "tripplite_usb"
"Tripp Lite" "ups" "1" "SMART700USB" "USB" "tripplite_usb"
"Tripp Lite" "ups" "1" "SMART1500RM2U" "USB (older; product ID: 0001)" "tripplite_usb"
"Tripp Lite" "ups" "1" "SMART550USB" "USB (older; product ID: 0001)" "tripplite_usb"
"Tripp Lite" "ups" "1" "OMNISMART500" "USB (older; product ID: 0001)" "tripplite_usb"
"Tripp Lite" "ups" "1" "SMART2200RMXL2U" "USB (older; product ID: 0001)" "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" "1500 LCD" "USB" "usbhid-ups"
"Tripp Lite" "ups" "3" "AVR550U" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=3090
"Tripp Lite" "ups" "3" "AVR700U" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=4785
"Tripp Lite" "ups" "3" "AVR750U" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=3141
"Tripp Lite" "ups" "3" "AVR900U" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=3649
"Tripp Lite" "ups" "3" "AVR900UTAA" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4375
"Tripp Lite" "ups" "3" "AVRX550U" "USB (protocol 2009)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3079
"Tripp Lite" "ups" "3" "AVRX550UD" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=4620
"Tripp Lite" "ups" "3" "AVRX750U" "USB (protocol 2009)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=3190
"Tripp Lite" "ups" "3" "AVRX750UD" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=4755
"Tripp Lite" "ups" "3" "AVRX750UF" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=4756
"Tripp Lite" "ups" "3" "BC600SINE" "USB (protocol 2011)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4863
"Tripp Lite" "ups" "3" "BCPERS450" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4
"Tripp Lite" "ups" "3" "BCPRO600" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=931&txtModelID=5
"Tripp Lite" "ups" "3" "ECO350UPS" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=743&txtModelID=4149
"Tripp Lite" "ups" "3" "ECO550UPS" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=743&txtModelID=4148
"Tripp Lite" "ups" "3" "ECO650LCD" "USB (protocol 2011)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4861
"Tripp Lite" "ups" "3" "ECO750UPS" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=743&txtModelID=4147
"Tripp Lite" "ups" "3" "ECO850LCD" "USB (protocol 2011)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=743&txtModelID=4862
"Tripp Lite" "ups" "3" "HT850UPS" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3197
"Tripp Lite" "ups" "3" "HTR05-1U" "USB (protocol 3005)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3202
"Tripp Lite" "ups" "3" "HTR10-2U" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3343
"Tripp Lite" "ups" "3" "INTERNET350U" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=2663
"Tripp Lite" "ups" "3" "INTERNET550U" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=3063
"Tripp Lite" "ups" "3" "INTERNET600U" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=3033
"Tripp Lite" "ups" "3" "INTERNET750U" "USB (protocol 1007)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3142
"Tripp Lite" "ups" "3" "INTERNET900U" "USB (protocol 1007)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=3657
"Tripp Lite" "ups" "3" "INTERNETOFFICE500" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=11
"Tripp Lite" "ups" "3" "INTERNETOFFICE700" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=930&txtModelID=14
"Tripp Lite" "ups" "3" "OMNI650LCD" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3195
"Tripp Lite" "ups" "3" "OMNI900LCD" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=3082
"Tripp Lite" "ups" "2" "OMNI1000LCD" "USB" "usbhid-ups"
"Tripp Lite" "ups" "3" "OMNISMART300PNP" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=19
"Tripp Lite" "ups" "3" "OMNISMART500" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=21
"Tripp Lite" "ups" "3" "OMNISMART700" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=23
"Tripp Lite" "ups" "3" "OMNIVS1000" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2656
"Tripp Lite" "ups" "3" "OMNIVS800" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2729
"Tripp Lite" "ups" "3" "POS500" "USB (protocol 2007)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3742
"Tripp Lite" "ups" "3" "SM2200RMDVTAA" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4648
"Tripp Lite" "ups" "3" "SMART1000LCD" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=3071
"Tripp Lite" "ups" "3" "SMART1000RM2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=2657
"Tripp Lite" "ups" "3" "SMART1000RMXL2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=5262
"Tripp Lite" "ups" "3" "SMART1050SLT" "USB (protocol 3012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3253
"Tripp Lite" "ups" "3" "SMART1050SLTAA" "USB (protocol 3012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4389
"Tripp Lite" "ups" "3" "SMART1200LCD" "USB (protocol 2009)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3193
"Tripp Lite" "ups" "3" "SMART1500CRMXL" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3826
"Tripp Lite" "ups" "3" "SMART1500LCD" "USB (protocol 2009)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=3151
"Tripp Lite" "ups" "3" "SMART1500LCDXL" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=4978
"Tripp Lite" "ups" "3" "SMART1500RM2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=2658
"Tripp Lite" "ups" "3" "SMART1500RM2UN" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=5424
"Tripp Lite" "ups" "3" "SMART1500RMXL2UA" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3982
"Tripp Lite" "ups" "3" "SMART1500RMXLN" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=5429
"Tripp Lite" "ups" "3" "SMART1500SLT" "USB (protocol 3012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3254
"Tripp Lite" "ups" "3" "SMART2200CRMXL" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3825
"Tripp Lite" "ups" "3" "SMART2200RM2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=4403
"Tripp Lite" "ups" "3" "SMART2200RM2UN" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=5428
"Tripp Lite" "ups" "3" "SMART2200RMXL2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3264
"Tripp Lite" "ups" "3" "SMART2200RMXL2UP" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=4672
"Tripp Lite" "ups" "3" "SMART2200RMXLN" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=5427
"Tripp Lite" "ups" "3" "SMART2200SLT" "USB (protocol 3013)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3489
"Tripp Lite" "ups" "3" "SMART2200SLTAA" "USB (protocol 3013)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4390
"Tripp Lite" "ups" "3" "SMART2500XLHG" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=5440
"Tripp Lite" "ups" "3" "SMART2600RM2U" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3024
"Tripp Lite" "ups" "3" "SMART3000CRMXL" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3824
"Tripp Lite" "ups" "3" "SMART3000RM2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3025
"Tripp Lite" "ups" "3" "SMART3000RM2UN" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=5426
"Tripp Lite" "ups" "3" "SMART3000RMOD2U" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=4249
"Tripp Lite" "ups" "3" "SMART3000RMXL2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=4418
"Tripp Lite" "ups" "3" "SMART3000RMXLN" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=5425
"Tripp Lite" "ups" "3" "SMART3000SLT" "USB (protocol 3013)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3490
"Tripp Lite" "ups" "3" "SMART500RT1U" "USB (protocol 3005)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=2853
"Tripp Lite" "ups" "3" "SMART550USB" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2002
"Tripp Lite" "ups" "3" "SMART550USBWD" "USB (protocol 2010)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2591
"Tripp Lite" "ups" "3" "SMART750RMXL2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3020
"Tripp Lite" "ups" "3" "SMART750SLT" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3007
"Tripp Lite" "ups" "3" "SMART750USB" "USB (protocol 2012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=2679
"Tripp Lite" "ups" "3" "SMART750XLA" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=3820
"Tripp Lite" "ups" "3" "SMX1000LCD" "USB (protocol 2005)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3200
"Tripp Lite" "ups" "3" "SMX1000RT2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=2798
"Tripp Lite" "ups" "3" "SMX1050SLT" "USB (protocol 3012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3249
"Tripp Lite" "ups" "3" "SMX1500LCD" "USB (protocol 2009)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=932&txtModelID=3303
"Tripp Lite" "ups" "3" "SMX1500SLT" "USB (protocol 3012)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3248
"Tripp Lite" "ups" "3" "SMX1500XLRT2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=2687
"Tripp Lite" "ups" "3" "SMX2200XLRT2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3251
"Tripp Lite" "ups" "3" "SMX3000RT2UTAA" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4396
"Tripp Lite" "ups" "3" "SMX3000XLRT2U" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=933&txtModelID=2694
"Tripp Lite" "ups" "3" "SMX3000XLRT2UA" "USB (protocol 3015)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=5658
"Tripp Lite" "ups" "3" "SMX500RT1U" "USB (protocol 3005)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=2691
"Tripp Lite" "ups" "3" "SMX750SLT" "USB (protocol 3014)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3021
"Tripp Lite" "ups" "3" "SU1000RTXL2UA" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=2948
"Tripp Lite" "ups" "3" "SU1000RTXLCD2U" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=745&txtModelID=4980
"Tripp Lite" "ups" "3" "SU1000XLA" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=3180
"Tripp Lite" "ups" "3" "SU1000XLCD" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=5320
"Tripp Lite" "ups" "3" "SU1500RTXL2UA (SmartOnline)" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=2949
"Tripp Lite" "ups" "3" "SU1500RTXLCD2U" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=745&txtModelID=5037
"Tripp Lite" "ups" "3" "SU1500XL" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=3300
"Tripp Lite" "ups" "3" "SU1500XLCD" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=744&txtModelID=5339
"Tripp Lite" "ups" "3" "SU2200RTXL2UA" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=2950
"Tripp Lite" "ups" "3" "SU2200RTXLCD2U" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=745&txtModelID=5069
"Tripp Lite" "ups" "3" "SU2200XLA" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=3594
"Tripp Lite" "ups" "3" "SU2200XLCD" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=744&txtModelID=5340
"Tripp Lite" "ups" "3" "SU3000RTXL2U" "USB (protocol 4005)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4210
"Tripp Lite" "ups" "3" "SU3000RTXL3U" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=3023
"Tripp Lite" "ups" "3" "SU3000RTXLCD3U" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=745&txtModelID=5071
"Tripp Lite" "ups" "3" "SU3000RTXR3U" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=3080
"Tripp Lite" "ups" "3" "SU3000RTXR3UHW" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=4976
"Tripp Lite" "ups" "3" "SU3000XL" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=3601
"Tripp Lite" "ups" "3" "SU3000XLCD" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=744&txtModelID=5342
"Tripp Lite" "ups" "3" "SU750RTXL2U" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3194
"Tripp Lite" "ups" "3" "SU750RTXLCD2U" "USB (protocol 4004)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=5070
"Tripp Lite" "ups" "3" "SU750XL" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3299
"Tripp Lite" "ups" "3" "SUINT1000RTXL2UA" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=3983
"Tripp Lite" "ups" "3" "SUINT1500RTXL2UA" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=2720
"Tripp Lite" "ups" "3" "SUINT2200RTXL2UA" "USB (protocol 4001)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtSeriesID=934&txtModelID=3970
"Tripp Lite" "ups" "3" "SUINT3000RTXL2U" "USB (protocol 4005)" "usbhid-ups" # http://www.tripplite.com/en/products/model.cfm?txtModelID=4523
"Trust" "ups" "2" "UPS 1000 Management PW-4105" "" "blazer_ser"
"Trust" "ups" "2" "UPS 1200VA Management PW-4120M" "" "blazer_ser"
@ -877,6 +1049,8 @@
"Various" "ups" "3" "(various)" "SNMP - RFC 1628" "snmp-ups (experimental)"
"Various" "ups" "1" "(various)" "Safenet software" "safenet"
"Various" "ups" "2" "(Various USB)" "UPSilon 2000 software" "blazer_usb langid_fix=0x409"
"Various" "ups" "2" "(Various serial)" "ViewPower software" "nutdrv_qx"
"Various" "ups" "2" "(Various USB)" "ViewPower software" "nutdrv_qx"
"Various" "ups" "2" "(Various serial)" "WinPower software" "blazer_ser"
"Various" "ups" "2" "(Various USB)" "WinPower software" "blazer_usb"
"Various" "ups" "2" "Various Innova T" "(USB ID 06da:0201)" "blazer_ser or blazer_usb"
@ -890,7 +1064,15 @@
"Vivaldi" "ups" "1" "EA200 LED" "USB" "richcomm_usb"
"Voltronic Power" "ups" "2" "Frigate TX 1KVA" "Serial" "nutdrv_qx"
"Voltronic Power" "ups" "2" "Frigate TX 1KVA" "USB" "nutdrv_qx"
"Voltronic Power" "ups" "2" "Galleon 1KVA" "Serial" "nutdrv_qx"
"Voltronic Power" "ups" "2" "Galleon 1KVA" "USB" "nutdrv_qx"
"Voltronic Power" "ups" "2" "(various)" "Serial" "nutdrv_qx"
"Voltronic Power" "ups" "2" "(various)" "USB" "nutdrv_qx"
"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)"

View file

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -16,6 +16,23 @@
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -52,8 +69,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
$(top_srcdir)/m4/nut_check_libltdl.m4 \
$(top_srcdir)/m4/nut_check_libneon.m4 \
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
$(top_srcdir)/m4/nut_check_libnss.m4 \
$(top_srcdir)/m4/nut_check_libopenssl.m4 \
$(top_srcdir)/m4/nut_check_libpowerman.m4 \
$(top_srcdir)/m4/nut_check_libssl.m4 \
$(top_srcdir)/m4/nut_check_libusb.m4 \
$(top_srcdir)/m4/nut_check_libwrap.m4 \
$(top_srcdir)/m4/nut_check_os.m4 \
@ -69,6 +87,11 @@ CONFIG_CLEAN_FILES = header.html
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__dist_html_DATA_DIST = index.html bottom.html nut-banner.png
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
@ -91,6 +114,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(htmldir)" "$(DESTDIR)$(htmldir)"
DATA = $(dist_html_DATA) $(nodist_html_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@ -99,6 +128,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
ASCIIDOC = @ASCIIDOC@
ASPELL = @ASPELL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@ -125,6 +155,7 @@ DOC_BUILD_LIST = @DOC_BUILD_LIST@
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
DRVPATH = @DRVPATH@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@ -326,8 +357,11 @@ clean-libtool:
-rm -rf .libs _libs
install-dist_htmlDATA: $(dist_html_DATA)
@$(NORMAL_INSTALL)
test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
@list='$(dist_html_DATA)'; test -n "$(htmldir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
$(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@ -341,13 +375,14 @@ uninstall-dist_htmlDATA:
@$(NORMAL_UNINSTALL)
@list='$(dist_html_DATA)'; test -n "$(htmldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(htmldir)" && rm -f $$files
dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir)
install-nodist_htmlDATA: $(nodist_html_DATA)
@$(NORMAL_INSTALL)
test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
@list='$(nodist_html_DATA)'; test -n "$(htmldir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
$(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@ -361,9 +396,7 @@ uninstall-nodist_htmlDATA:
@$(NORMAL_UNINSTALL)
@list='$(nodist_html_DATA)'; test -n "$(htmldir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(htmldir)" && rm -f $$files
dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
@ -418,10 +451,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:

190
depcomp
View file

@ -1,10 +1,10 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2009-04-28.21; # UTC
scriptversion=2012-03-27.16; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
# Software Foundation, Inc.
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -28,7 +28,7 @@ scriptversion=2009-04-28.21; # UTC
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
@ -40,11 +40,11 @@ as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
source Source file read by 'PROGRAMS ARGS'.
object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
@ -57,6 +57,12 @@ EOF
;;
esac
# A tabulation character.
tab=' '
# A newline character.
nl='
'
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
@ -90,10 +96,24 @@ if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u="sed s,\\\\\\\\,/,g"
cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
# This is just like msvc7 but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvc7
fi
if test "$depmode" = xlc; then
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
gccflag=-qmakedep=gcc,-MF
depmode=gcc
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
@ -148,20 +168,21 @@ gcc)
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
tr ' ' "$nl" < "$tmpdepfile" |
## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well.
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@ -193,18 +214,15 @@ sgi)
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> "$depfile"
tr "$nl" ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
@ -216,10 +234,17 @@ sgi)
rm -f "$tmpdepfile"
;;
xlc)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
@ -249,12 +274,11 @@ aix)
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Each line is of the form 'foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
# '$object: dependent.h' and one to simply 'dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@ -265,23 +289,26 @@ aix)
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
# However on
# $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# which is wrong. We want
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# and will wrap long lines using '\':
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
# tcc 0.9.26 (FIXME still under development at the moment of writing)
# will emit a similar output, but also prepend the continuation lines
# with horizontal tabulation characters.
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
@ -290,15 +317,21 @@ icc)
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Each line is of the form 'foo.o: dependent.h',
# or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
# '$object: dependent.h' and one to simply 'dependent.h:'.
sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
< "$tmpdepfile" > "$depfile"
sed '
s/[ '"$tab"'][ '"$tab"']*/ /g
s/^ *//
s/ *\\*$//
s/^[^:]*: *//
/^$/d
/:$/d
s/$/ :/
' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
@ -334,7 +367,7 @@ hp2)
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
# Add 'dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
@ -349,9 +382,9 @@ hp2)
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# dependencies in 'foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
@ -397,14 +430,59 @@ tru64)
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
msvc7)
if test "$libtool" = yes; then
showIncludes=-Wc,-showIncludes
else
showIncludes=-showIncludes
fi
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
if test "$stat" = 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The first sed program below extracts the file names and escapes
# backslashes for cygpath. The second sed program outputs the file
# name when reading, but also accumulates all include files in the
# hold buffer in order to output them again at the end. This only
# works with sed implementations that can handle large buffers.
sed < "$tmpdepfile" -n '
/^Note: including file: *\(.*\)/ {
s//\1/
s/\\/\\\\/g
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
s/\(.*\)/'"$tab"'\1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
s/.*/'"$tab"'/
G
p
}' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvc7msys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
@ -422,7 +500,7 @@ dashmstdout)
shift
fi
# Remove `-o $object'.
# Remove '-o $object'.
IFS=" "
for arg
do
@ -442,15 +520,14 @@ dashmstdout)
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
tr ' ' "$nl" < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@ -503,9 +580,10 @@ makedepend)
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@ -525,7 +603,7 @@ cpp)
shift
fi
# Remove `-o $object'.
# Remove '-o $object'.
IFS=" "
for arg
do
@ -594,8 +672,8 @@ msvisualcpp)
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;

View file

@ -90,7 +90,7 @@ 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 firewall rules. Port 3493/tcp must be opened to incoming connections,
- your tcp-wrappers configuration (hosts.allow and hosts.deny).
Refer to the upsd(8) and upsd.conf(5) manpages for more information.
@ -538,6 +538,24 @@ 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.
== My USB UPS is supported but doesn't work!
On Linux, udev rules are provided to set the correct permissions on device file.
This allows the NUT driver to communicate with the UPS, through this device file.
However, the driver may still failed to start and support the device, with a
message like:
failed to claim USB device: could not claim interface 0: Operation not permitted
*Operation not permitted* is a message pointing a privilege issue.
The most frequent issue is that udev has not actually applied the rule:
- if NUT has been freshly installed,
- and if the device USB cord was already plugged when installing nut.
In this case, just unplug and plug back the USB cord, then restart nut.
== Why doesn't my package work?
Or a variation like...

View file

@ -20,8 +20,9 @@ USER_MANUAL_DEPS = acknowledgements.txt cables.txt config-notes.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
developer-guide.txt hid-subdrivers.txt macros.txt new-clients.txt \
new-drivers.txt net-protocol.txt nutdrv_qx-subdrivers.txt \
snmp-subdrivers.txt sock-protocol.txt
CABLES_DEPS = cables/apc-rs500-serial.txt \
cables/apc.txt cables/ge-imv-victron.txt cables/imv.txt \
@ -34,9 +35,12 @@ CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \
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
ALL_TXT_SRC = nut-names.txt $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \
$(CABLES_DEPS) FAQ.txt nut-hal.txt nut-qa.txt packager-guide.txt snmp.txt
NUT_SPELL_DICT = nut.dict
EXTRA_DIST = $(ALL_TXT_SRC) $(SHARED_DEPS) $(IMAGE_FILES) \
$(CABLES_IMAGES) docinfo.xml $(NUT_SPELL_DICT)
ASCIIDOC_HTML_SINGLE = user-manual.html \
developer-guide.html \
@ -74,13 +78,14 @@ website:
endif !HAVE_ASCIIDOC
clean-local:
rm -rf *.pdf *.html *.chunked docbook-xsl.css
rm -rf *.pdf *.html *.chunked docbook-xsl.css *.bak
# Static HCL is generated automatically
# This is more of a harness, since this file should have already been
# generated, due to the top level Makefile SUBDIRS ordering (tools before docs)
ups-html.txt:
cd ../tools; $(MAKE) $(AM_MAKEFLAGS) website
ups-html.txt: ../data/driver.list.in
cd ../data && $(MAKE) $(AM_MAKEFLAGS) driver.list
cd ../tools && $(MAKE) $(AM_MAKEFLAGS) website
### TODO: automatic dependency generation
# Add other directory deps (not for local EXTRA_DIST) and generated contents
@ -116,4 +121,27 @@ A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) --attribute icons \
.txt.pdf: docinfo.xml
$(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $<
if HAVE_ASPELL
# FIXME: also check ../{NEWS,README,UPGRADING}+other dirs
# Non-interactively spell check all documentation source files.
# This is useful for Buildbot and automated QA processing
# FIXME: how to present output (std{out,err}, single file or per target)?
spellcheck:
@for docsrc in $(ALL_TXT_SRC); do \
echo "Spell checking on $$docsrc"; \
LANG=C $(ASPELL) -a -t -p $(NUT_SPELL_DICT) < $$docsrc | grep [^*]; \
done
# Interactively spell check all documentation source files
spellcheck-interactive:
@for docsrc in $(ALL_TXT_SRC); do\
echo "Spell checking on $$docsrc"; \
LANG=C $(ASPELL) check -p $(NUT_SPELL_DICT) $$docsrc; \
done
else !HAVE_ASPELL
spellcheck:
@echo "Documentation spell check not available since 'aspell' was not found."
spellcheck-interactive:
@echo "Documentation spell check not available since 'aspell' was not found."
endif !HAVE_ASPELL
.PHONY: html html-single pdf website

View file

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -15,6 +15,23 @@
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -50,8 +67,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
$(top_srcdir)/m4/nut_check_libltdl.m4 \
$(top_srcdir)/m4/nut_check_libneon.m4 \
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
$(top_srcdir)/m4/nut_check_libnss.m4 \
$(top_srcdir)/m4/nut_check_libopenssl.m4 \
$(top_srcdir)/m4/nut_check_libpowerman.m4 \
$(top_srcdir)/m4/nut_check_libssl.m4 \
$(top_srcdir)/m4/nut_check_libusb.m4 \
$(top_srcdir)/m4/nut_check_libwrap.m4 \
$(top_srcdir)/m4/nut_check_os.m4 \
@ -74,6 +92,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@ -113,6 +136,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
ASCIIDOC = @ASCIIDOC@
ASPELL = @ASPELL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@ -139,6 +163,7 @@ DOC_BUILD_LIST = @DOC_BUILD_LIST@
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
DRVPATH = @DRVPATH@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@ -313,8 +338,9 @@ USER_MANUAL_DEPS = acknowledgements.txt cables.txt config-notes.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
developer-guide.txt hid-subdrivers.txt macros.txt new-clients.txt \
new-drivers.txt net-protocol.txt nutdrv_qx-subdrivers.txt \
snmp-subdrivers.txt sock-protocol.txt
CABLES_DEPS = cables/apc-rs500-serial.txt \
cables/apc.txt cables/ge-imv-victron.txt cables/imv.txt \
@ -327,9 +353,12 @@ CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \
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
ALL_TXT_SRC = nut-names.txt $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \
$(CABLES_DEPS) FAQ.txt nut-hal.txt nut-qa.txt packager-guide.txt snmp.txt
NUT_SPELL_DICT = nut.dict
EXTRA_DIST = $(ALL_TXT_SRC) $(SHARED_DEPS) $(IMAGE_FILES) \
$(CABLES_IMAGES) docinfo.xml $(NUT_SPELL_DICT)
ASCIIDOC_HTML_SINGLE = user-manual.html \
developer-guide.html \
@ -582,13 +611,10 @@ distdir: $(DISTFILES)
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 \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@ -623,10 +649,15 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@ -734,13 +765,14 @@ html-chunked: $(ASCIIDOC_HTML_CHUNKED)
@HAVE_ASCIIDOC_FALSE@ @echo "Not building website documentation since 'asciidoc' was not found."
clean-local:
rm -rf *.pdf *.html *.chunked docbook-xsl.css
rm -rf *.pdf *.html *.chunked docbook-xsl.css *.bak
# Static HCL is generated automatically
# This is more of a harness, since this file should have already been
# generated, due to the top level Makefile SUBDIRS ordering (tools before docs)
ups-html.txt:
cd ../tools; $(MAKE) $(AM_MAKEFLAGS) website
ups-html.txt: ../data/driver.list.in
cd ../data && $(MAKE) $(AM_MAKEFLAGS) driver.list
cd ../tools && $(MAKE) $(AM_MAKEFLAGS) website
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)
@ -755,6 +787,26 @@ packager-guide.html packager-guide.chunked packager-guide.pdf: packager-guide.tx
.txt.pdf: docinfo.xml
$(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 $<
# FIXME: also check ../{NEWS,README,UPGRADING}+other dirs
# Non-interactively spell check all documentation source files.
# This is useful for Buildbot and automated QA processing
# FIXME: how to present output (std{out,err}, single file or per target)?
@HAVE_ASPELL_TRUE@spellcheck:
@HAVE_ASPELL_TRUE@ @for docsrc in $(ALL_TXT_SRC); do \
@HAVE_ASPELL_TRUE@ echo "Spell checking on $$docsrc"; \
@HAVE_ASPELL_TRUE@ LANG=C $(ASPELL) -a -t -p $(NUT_SPELL_DICT) < $$docsrc | grep [^*]; \
@HAVE_ASPELL_TRUE@ done
# Interactively spell check all documentation source files
@HAVE_ASPELL_TRUE@spellcheck-interactive:
@HAVE_ASPELL_TRUE@ @for docsrc in $(ALL_TXT_SRC); do\
@HAVE_ASPELL_TRUE@ echo "Spell checking on $$docsrc"; \
@HAVE_ASPELL_TRUE@ LANG=C $(ASPELL) check -p $(NUT_SPELL_DICT) $$docsrc; \
@HAVE_ASPELL_TRUE@ done
@HAVE_ASPELL_FALSE@spellcheck:
@HAVE_ASPELL_FALSE@ @echo "Documentation spell check not available since 'aspell' was not found."
@HAVE_ASPELL_FALSE@spellcheck-interactive:
@HAVE_ASPELL_FALSE@ @echo "Documentation spell check not available since 'aspell' was not found."
.PHONY: html html-single pdf website
# Tell versions [3.59,3.63) of GNU make to not export all variables.

View file

@ -21,13 +21,22 @@ Active members
- Arnaud Quette: project leader (since 2005), Debian packager and jack of all trades
- Charles Lepple: senior lieutenant
- Frederic Bohe: senior developer
- Emilien Kia: senior developer
- Václav Krpec: junior developer
- Kjell Claesson: senior developer
- Alexander Gordeev: junior developer
- Michal Soltys: junior developer
- David Goncalves: Python developer
- Jean Perriault: web consultant
- Eric S. Raymond: Documentation consultant
- Oden Eriksson: Mandriva packager
- Stanislav Brabec: Novell / Suse packager
- Michal Hlavinka: Redhat packager
- Antoine Colombier: trainee
For an up to date list of NUT developers, refer to
link:https://alioth.debian.org/project/memberlist.php?group_id=30602[Alioth].
Retired members
~~~~~~~~~~~~~~~
@ -61,7 +70,7 @@ 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,
- hosting the networkupstools.org webserver (from 2005 to August 2012),
- providing artwork,
- promoting NUT in general.
@ -90,6 +99,17 @@ link:http://www.microdowell.com/fra/download.html[Linux / Unix].
link:ups-protocols.html[extensive information] on its USB/HID devices, along
with development units.
- link:http://www.riello-ups.com[Riello UPS], through Massimo Zampieri, has
provided link:ups-protocols.html[all protocols information]. Elio Parisi has
also created riello_ser and riello_usb to support these protocols.
- link:http://www.tripplite.com[Tripp Lite], through Eric Cobb, has provided
test results from connecting their HID-compliant UPS hardware to NUT. Some of
this information has been incorporated into the NUT hardware compatibility
list, and the rest of the information is available via the
link:http://article.gmane.org/gmane.comp.monitoring.nut.user/8173[list
archives].
Appliances manufacturers
~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -95,10 +95,13 @@ Build and install all of the above (the serial, USB, SNMP, XML/HTTP and
PowerMan drivers, the CGI programs and HTML files, and the upsclient
library).
--with-ssl (default: auto-detect)
--with-ssl (default: auto-detect)
--with-nss (default: auto-detect)
--with-openssl (default: auto-detect)
Enable SSL development code. Read the section "Configuring SSL" in
docs/security.txt for instructions on SSL support.
Enable SSL support, using either Mozilla NSS or OpenSSL.
If both are present, and nothing was specified, OpenSSL support will
be prefered. Read docs/security.txt for instructions on SSL support.
--with-wrap (default: auto-detect)

View file

@ -2,7 +2,7 @@ Information for developers
==========================
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
-----------------------------------
@ -10,16 +10,16 @@ General stuff - common subdirectory
String handling
~~~~~~~~~~~~~~~
Use snprintf. It's even provided with a compatibility module if the
target host doesn't have it natively.
Use snprintf(). It's even provided with a compatibility module if the
target system doesn't have it natively.
If you use snprintf to load some value into a buffer, make sure you
If you use snprintf() to load some value into a buffer, make sure you
provide the format string. Don't use user-provided format strings,
since that's an easy way to open yourself up to an exploit.
Don't use strcat. We have a neat wrapper for snprintf called snprintfcat
Don't use strcat(). We have a neat wrapper for snprintf() called snprintfcat()
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
~~~~~~~~~~~~~~~
@ -38,9 +38,9 @@ exit(EXIT_FAILURE) afterwards. Don't call exit() directly.
Debugging information
~~~~~~~~~~~~~~~~~~~~~
upsdebug_with_errno(), upsdebugx() and upsdebug_hex() use the
global nut_debug_level so you don't have to mess around with
printfs yourself. Use them.
upsdebug_with_errno(), upsdebugx(), upsdebug_hex() and upsdebug_ascii()
use the global `nut_debug_level` so you don't have to mess around with
printf()s yourself. Use them.
Memory allocation
~~~~~~~~~~~~~~~~~
@ -312,20 +312,19 @@ and many people have put a lot of time and energy to improve it.
Submitting patches
------------------
Patches that arrive in unified format (diff -u) as plain text attachments with
no HTML and a brief summary at the top are the easiest to handle.
Small patches that arrive in unified format (diff -u) as plain text attachments
with no HTML and a brief summary at the top are the easiest to handle.
If a patch is sent to the nut-upsdev mailing list, it stands a better chance of
being seen immediately. However, it is likely to be dropped if any issues
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].
This allows us to track the patches over a longer period of time, and it is
less likely that a patch will fall through the cracks. Posting a reminder to
the developers (via the nut-upsdev list) about a patch on the tracker is fair
game.
a large change, your best bet is to submit a pull request or create an
link:https://github.com/networkupstools/nut/issues[issue on GitHub].
The issue tracker allows us to track the patches over a longer period of time,
and it is less likely that a patch will fall through the cracks. Posting a
reminder to the developers (via the nut-upsdev list) about a patch on GitHub is
fair game.
Patch cohesion
--------------
@ -343,8 +342,8 @@ instead of just dropping it.
If you have to make big changes in lots of places, send multiple
patches - one per item.
The completion touch: manual pages and device entry in HCL
----------------------------------------------------------
The finishing touches: manual pages and device entry in HCL
-----------------------------------------------------------
If you change something that involves an argument to a program or
configuration file parsing, the man page is probably now out of date.
@ -363,96 +362,181 @@ 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.
We currently use a Git repository hosted at GitHub (with a mirror at Alioth) to track
changes to the NUT source code. This allows you to clone the repository (or
fork, in GitHub parlance), make changes, and post them online for review prior
to integration.
Anonymous SVN checkouts are possible:
To obtain permission to commit directly to the master NUT repository, you must
be prepared to spend a fair amount of time contributing to the NUT codebase.
Most developers will be well served by committing to their own Git repository,
and having the NUT team merge their changes.
svn co svn://svn.debian.org/nut/trunk nut-svn-readonly
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`). Git also allows you to accumulate
more than one commit worth of changes before pushing to another repository.
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.
For a quick change to a file in the Git working copy, you can use `git diff` to
generate a patch to send to the nut-upsdev mailing list. If you have more
extensive changes, you can use `git format-patch` on a complete commit or
branch, and send the resulting series of patches to the list.
The link:https://git.wiki.kernel.org/index.php/GitSvnCrashCourse[GitSvnCrashCourse]
wiki page has some useful information for long-time users of Subversion.
Git access
~~~~~~~~~~
Anonymous Git checkouts are possible:
git clone git://github.com/networkupstools/nut.git
or
git clone https://github.com/networkupstools/nut.git
if it is necessary to get around a pesky firewall that blocks the native Git
protocol.
For a quicker checkout (when you don't need the entire repository history),
you can limit the depth of the clone:
git clone --depth 1 git://github.com/networkupstools/nut.git
In case the GitHub repository is temporarily unavailable for any reason, we
also plan to push to Alioth's
link:https://alioth.debian.org/scm/?group_id=30602[Git server] as well. You can
add a remote reference to your local repository:
cd path/to/nut
git remote add -f alioth git://anonscm.debian.org/nut/nut.git
Mercurial (hg) access
~~~~~~~~~~~~~~~~~~~~~
There are those who prefer the simplicity and self-consistency of the Mercurial
SCM client over the hodgepodge of unique commands which make up Git. Rather
than debate the merits of each system, we will gently guide you towards the
link:http://hg-git.github.com/[hg-git project] which would theoretically be a
transparent bridge between the central Git repository, and your local Mercurial
working copy.
Other tools for hg/git interoperability are sure to exist. We would welcome any
feedback about this process on the nut-upsdev mailing list.
Subversion (SVN) access
~~~~~~~~~~~~~~~~~~~~~~~
If you prefer to check out the NUT source code using an SVN client, GitHub
has a link:https://github.com/blog/966-improved-subversion-client-support[SVN
interface to Git repositories] hosted on their servers. You can fork a copy of
the NUT repository and commit to your fork with SVN.
Be aware that the examples in the GitHub blog post might result in a checkout
that includes all of the current branches, as well as the trunk. You are most
likely interested in a command line similar to the following:
svn co https://github.com/networkupstools/nut/trunk nut-trunk-svn
Ignoring generated files
------------------------
The NUT repository generally only holds files which are not generated from
other files. This prevents spurious differences from being recorded in the
repository history.
If you add a driver, it is recommended that you add the driver executable name
to the .gitignore file in that directory. Similarly, files generated from *.in
and *.am sources should be ignored as well. We try to include a number of
generated files in the tarball releases with `make dist` hooks in order to
minimize the number of dependencies for end users, but the assumption is that
a developer can install the packages needed to regenerate those files.
Commit message formatting
-------------------------
From the `git commit` man page:
[quote]
Though not required, its a good idea to begin the commit message with a single
short (less than 50 character) line summarizing the change, followed by a blank
line and then a more thorough description. The text up to the first blank line
in a commit message is treated as the commit title, and that title is used
throughout git.
If your commit is just a change to one component, such as the HCL, upsd or a
specific driver, prefix your commit message in a way that matches similar
commits. This helps when searching the repository or tracking down a
regression.
Referring to previous commits can be tricky. If you are referring to the
immediate parent of a given commit, it suffices to say "the previous commit".
(Are you correcting a typo in the previous commit? If you haven't pushed yet,
consider using the `git commit --amend` command instead of creating a new
commit.) For other commits, even though tools like gitk and GitHub's
repository viewers recognize Git hashes and create links automatically, it is
best to add some context such as the commit title or a date.
You may notice that some older commits have `[[SVN:####]]` tags and Fossil-ID
footers. These were lifted from the old SVN commit messages using reposurgeon,
and should not be used as a guide for future commits.
Repository etiquette and quality assurance
------------------------------------------
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
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
merge the changes back to the trunk once they are complete.
Please keep the Git master branch in working condition at all times. The
master branch may be used to generate daily tarballs, and should not contain
broken code. If you need to commit incremental changes that leave the system
in a broken state, please do so in a separate branch and merge the changes
back into master once they are complete.
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.
You are encouraged to use `git rebase -i` on your private Git branches to
separate your changes into <<_patch_cohesion,logical changes>>.
Running "make distcheck-light" is especially important if you have added or
From there, you can generate patches for the issue tracker, or the nut-upsdev list.
Note that once you rebase a branch, anyone else who has a copy of this branch
will need to rebase on top of your rebased branch. Obviously, this hinders
collaboration. In this case, we recommend that you rebase only in your private
repository, and push when things are ready for discussion. Merging instead of
rebasing will help with collaboration, but please do not turn the repository
history into a pile of spaghetti by merging unnecessarily. Be sure that your
commit messages are descriptive when merging.
Before pushing your commits upstream, 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.
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
adding a file to Git 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
tests, but will not work unless you have all the optional libraries
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
There is also +make distcheck+, which runs an even stricter set of
tests than +make distcheck-light+, but will not work unless you have all the
optional libraries and features installed.
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.
using Git, our preferred way to combine small changes with the upstream
upstream repository is to use `git rebase` on your local branch. This is
equivalent to treating your branch as a series of patches, and re-applying your
patches on top of the upstream changes.
If you haven't created a commit out of your local changes yet, and you want to
fetch the latest code, you can also use +git stash+ before pulling, then +git
stash pop+ to apply your saved changes.
Here is an example workflow:
--------------------------------------------------------------------------------
git clone -o central git://github.com/networkupstools/nut.git
cd nut
git remote add -f username git://github.com/username/nut.git
git checkout master
git branch my-new-feature
git checkout my-new-feature
@ -462,27 +546,21 @@ to the new SVN changes, much as though your branch were a series of patches.
git add changed-file.c
git commit
# Someone committed something to SVN. Fetch it.
# Fix a typo in a file or commit message:
git svn fetch
git rebase remotes/trunk
git commit -a --amend
# Someone committed something to the central repository. Fetch it.
git fetch central
git rebase central/master
# Publish your branch to your GitHub repository:
git push username my-new-feature
--------------------------------------------------------------------------------
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.

View file

@ -32,27 +32,22 @@ Stable tree: {tree_version}
You can also browse the link:http://www.networkupstools.org/source/{tree_version}/[stable source directory].
Testing tree: {tree_version}.x-pre
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is currently no testing release.
Development tree:
~~~~~~~~~~~~~~~~~
Code repository
^^^^^^^^^^^^^^^
The development tree is available through a Subversion repository hosted on the
link:http://alioth.debian.org/[Debian Alioth server].
The development tree is available through a Git repository hosted at
link:https://github.com/[GitHub].
To retrieve the current development tree, use the following command:
$ svn co svn://anonscm.debian.org/nut/trunk
$ git clone git://github.com/networkupstools/nut.git
To generate the build scripts, you must call, from the 'trunk' directory:
The configure script and its dependencies are not stored in Git. To generate
them, ensure that autoconf, automake and libtool are installed, then run the
following script in the directory you just checked out:
$ ./autogen.sh
@ -65,22 +60,34 @@ 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>>.
use Git or <<Snapshots,snapshots>>.
//////////////////////////
Browse code
^^^^^^^^^^^
You can also browse the code with link:http://alioth.debian.org/scm/?group_id=30602[WebSvn],
or through the link:http://trac.networkupstools.org/projects/nut[Trac mirror],
kindly hosted and maintained by Charles Lepple.
You can also browse the code at
link:https://github.com/networkupstools/nut[GitHub], or at the
link:http://alioth.debian.org/scm/?group_id=30602[Alioth mirror]. The code was
originally kept in Subversion, and the old
link:http://trac.networkupstools.org/projects/nut[Trac site] will be kept
around for a bit so as not to break the URLs in the mailing list archives.
[[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.
GitHub has several download links for repository snapshots (for particular tags
or branches), but you will need a number of tools such as autoconf, automake
and libtool to use these snapshots.
If our Buildbot instance is behaving, you can download a snapshot which does
not require auto* tools from this
link:http://buildbot.networkupstools.org/snapshots[builder]. Look for the
latest *[tarball]* link towards the top of the page, and be sure to check the
'Build ##' link to verify the branch name.
Older versions
~~~~~~~~~~~~~~
@ -101,26 +108,29 @@ 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:http://software.opensuse.org/package/nut[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-&amp;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].
link:http://www.openbsd.org/cgi-bin/cvsweb/ports/sysutils/nut/[OpenBSD],
link:http://doc.freenas.org/index.php/UPS[FreeNAS].
- 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 (complete port, Beta):
link:http://www.networkupstools.org/source/2.6/NUT-Installer-2.6.4-1.msi[Windows MSI installer 2.6.4-1]
link:http://www.networkupstools.org/package/windows/NUT-Installer-2.6.5-3.msi[Windows MSI installer 2.6.5-3]
Java packages
-------------
The jNut package has been split into its own link:https://github.com/networkupstools/jNut[GitHub repository].
- NUT Java support (client side, Beta)
link:http://www.networkupstools.org/package/java/jNut-0.2-SNAPSHOT.tar.gz[jNUT 0.2-SNAPSHOT]
@ -133,7 +143,7 @@ Virtualization packages
VMware
~~~~~~
- NUT client for ESXI 5.0 (offsite, René Garcia)
- NUT client for ESXi 5.0 (offsite, René Garcia)
* link:http://rene.margar.fr/2012/05/client-nut-pour-esxi-5-0/[blog entry (French)]
* link:http://rene.margar.fr/downloads/NutClient-ESXi500-1.0.2.tar.gz[VIB package]
* link:http://rene.margar.fr/downloads/NutClient-ESXi500-1.2.0.tar.gz[VIB package (v1.2.0)]

View file

@ -143,13 +143,13 @@ You should save this information to a file, e.g.
drivers/usbhid-ups -DD -u root -x explore -x vendorid=XXXX auto >& /tmp/info
You can create an initial "stub" subdriver for your device by using
script scripts/subdriver/path-to-subdriver.sh. Note: this only creates
script scripts/subdriver/gen-usbhid-subdriver.sh. Note: this only creates
a "stub" and needs to be futher customized to be useful (see
CUSTOMIZATION below).
Use the script as follows:
scripts/subdriver/path-to-subdriver.sh < /tmp/info
scripts/subdriver/gen-usbhid-subdriver.sh < /tmp/info
where /tmp/info is the file where you previously saved the debugging
information.

View file

@ -16,7 +16,8 @@ directory.
- NUT_CHECK_LIBNEON
- NUT_CHECK_LIBNETSNMP
- NUT_CHECK_LIBPOWERMAN
- NUT_CHECK_LIBSSL
- NUT_CHECK_LIBOPENSSL
- NUT_CHECK_LIBNSS
- NUT_CHECK_LIBUSB
- NUT_CHECK_LIBWRAP

View file

@ -119,10 +119,13 @@ HTML_CGI_MANS = \
# Development (--with-dev) related manpages
SRC_DEV_PAGES = \
upsclient.txt \
upscli_add_host_cert.txt \
upscli_cleanup.txt \
upscli_connect.txt \
upscli_disconnect.txt \
upscli_fd.txt \
upscli_get.txt \
upscli_init.txt \
upscli_list_next.txt \
upscli_list_start.txt \
upscli_readline.txt \
@ -132,6 +135,13 @@ SRC_DEV_PAGES = \
upscli_ssl.txt \
upscli_strerror.txt \
upscli_upserror.txt \
libnutclient.txt \
libnutclient_commands.txt \
libnutclient_devices.txt \
libnutclient_general.txt \
libnutclient_misc.txt \
libnutclient_tcp.txt \
libnutclient_variables.txt \
nutscan.txt \
nutscan_scan_snmp.txt \
nutscan_scan_usb.txt \
@ -139,6 +149,7 @@ SRC_DEV_PAGES = \
nutscan_scan_nut.txt \
nutscan_scan_avahi.txt \
nutscan_scan_ipmi.txt \
nutscan_scan_eaton_serial.txt \
nutscan_display_ups_conf.txt \
nutscan_display_parsable.txt \
nutscan_cidr_to_ip.txt \
@ -147,15 +158,20 @@ SRC_DEV_PAGES = \
nutscan_add_option_to_device.txt \
nutscan_add_device_to_device.txt \
nutscan_init.txt \
nutscan_get_serial_ports_list.txt \
libupsclient-config.txt \
skel.txt
# NOTE: nutclient_*.3 has no source counterpart (libnutclient_*.txt)
MAN3_DEV_PAGES = \
upsclient.3 \
upscli_add_host_cert.3 \
upscli_cleanup.3 \
upscli_connect.3 \
upscli_disconnect.3 \
upscli_fd.3 \
upscli_get.3 \
upscli_init.3 \
upscli_list_next.3 \
upscli_list_start.3 \
upscli_readline.3 \
@ -165,6 +181,40 @@ MAN3_DEV_PAGES = \
upscli_ssl.3 \
upscli_strerror.3 \
upscli_upserror.3 \
libnutclient.3 \
libnutclient_commands.3 \
libnutclient_devices.3 \
libnutclient_general.3 \
libnutclient_misc.3 \
libnutclient_tcp.3 \
libnutclient_variables.3 \
nutclient_authenticate.3 \
nutclient_destroy.3 \
nutclient_device_forced_shutdown.3 \
nutclient_device_login.3 \
nutclient_device_master.3 \
nutclient_execute_device_command.3 \
nutclient_get_device_command_description.3 \
nutclient_get_device_commands.3 \
nutclient_get_device_description.3 \
nutclient_get_device_num_logins.3 \
nutclient_get_device_rw_variables.3 \
nutclient_get_devices.3 \
nutclient_get_device_variable_description.3 \
nutclient_get_device_variables.3 \
nutclient_get_device_variable_values.3 \
nutclient_has_device.3 \
nutclient_has_device_command.3 \
nutclient_has_device_variable.3 \
nutclient_logout.3 \
nutclient_set_device_variable_value.3 \
nutclient_set_device_variable_values.3 \
nutclient_tcp_create_client.3 \
nutclient_tcp_disconnect.3 \
nutclient_tcp_get_timeout.3 \
nutclient_tcp_is_connected.3 \
nutclient_tcp_reconnect.3 \
nutclient_tcp_set_timeout.3 \
nutscan.3 \
nutscan_scan_snmp.3 \
nutscan_scan_usb.3 \
@ -172,6 +222,7 @@ MAN3_DEV_PAGES = \
nutscan_scan_nut.3 \
nutscan_scan_avahi.3 \
nutscan_scan_ipmi.3 \
nutscan_scan_eaton_serial.3 \
nutscan_display_ups_conf.3 \
nutscan_display_parsable.3 \
nutscan_cidr_to_ip.3 \
@ -179,6 +230,7 @@ MAN3_DEV_PAGES = \
nutscan_free_device.3 \
nutscan_add_option_to_device.3 \
nutscan_add_device_to_device.3 \
nutscan_get_serial_ports_list.3 \
nutscan_init.3
MAN1_DEV_PAGES = \
@ -195,10 +247,13 @@ endif
HTML_DEV_MANS = \
upsclient.html \
upscli_add_host_cert.html \
upscli_cleanup.html \
upscli_connect.html \
upscli_disconnect.html \
upscli_fd.html \
upscli_get.html \
upscli_init.html \
upscli_list_next.html \
upscli_list_start.html \
upscli_readline.html \
@ -208,6 +263,13 @@ HTML_DEV_MANS = \
upscli_ssl.html \
upscli_strerror.html \
upscli_upserror.html \
libnutclient.html \
libnutclient_commands.html \
libnutclient_devices.html \
libnutclient_general.html \
libnutclient_misc.html \
libnutclient_tcp.html \
libnutclient_variables.html \
nutscan.html \
nutscan_scan_snmp.html \
nutscan_scan_usb.html \
@ -215,6 +277,7 @@ HTML_DEV_MANS = \
nutscan_scan_nut.html \
nutscan_scan_avahi.html \
nutscan_scan_ipmi.html \
nutscan_scan_eaton_serial.html \
nutscan_display_ups_conf.html \
nutscan_display_parsable.html \
nutscan_cidr_to_ip.html \
@ -222,6 +285,7 @@ HTML_DEV_MANS = \
nutscan_free_device.html \
nutscan_add_option_to_device.html \
nutscan_add_device_to_device.html \
nutscan_get_serial_ports_list.html \
nutscan_init.html \
libupsclient-config.html \
skel.html
@ -237,6 +301,7 @@ else
# (--with-serial)
SRC_SERIAL_PAGES = \
al175.txt \
apcsmart.txt \
apcsmart-old.txt \
bcmxcp.txt \
@ -246,7 +311,8 @@ SRC_SERIAL_PAGES = \
bestuferrups.txt \
bestups.txt \
bestfcom.txt \
blazer.txt \
blazer-common.txt \
blazer_ser.txt \
clone.txt \
dummy-ups.txt \
etapro.txt \
@ -263,18 +329,22 @@ SRC_SERIAL_PAGES = \
mge-utalk.txt \
oneac.txt \
microdowell.txt \
nutdrv_qx.txt \
optiups.txt \
powercom.txt \
powerpanel.txt \
rhino.txt \
riello_ser.txt \
safenet.txt \
solis.txt \
tripplite.txt \
tripplitesu.txt \
upscode2.txt \
victronups.txt
victronups.txt \
apcupsd-ups.txt
MAN_SERIAL_PAGES = \
al175.8 \
apcsmart.8 \
apcsmart-old.8 \
bcmxcp.8 \
@ -284,7 +354,7 @@ MAN_SERIAL_PAGES = \
bestuferrups.8 \
bestups.8 \
bestfcom.8 \
blazer.8 \
blazer_ser.8 \
clone.8 \
dummy-ups.8 \
etapro.8 \
@ -299,24 +369,28 @@ MAN_SERIAL_PAGES = \
metasys.8 \
mge-shut.8 \
mge-utalk.8 \
nutdrv_qx.8 \
oneac.8 \
microdowell.8 \
optiups.8 \
powercom.8 \
powerpanel.8 \
rhino.8 \
riello_ser.8 \
safenet.8 \
solis.8 \
tripplite.8 \
tripplitesu.8 \
upscode2.8 \
victronups.8
victronups.8 \
apcupsd-ups.8
if WITH_SERIAL
man8_MANS += $(MAN_SERIAL_PAGES)
endif
HTML_SERIAL_MANS = \
al175.html \
apcsmart.html \
apcsmart-old.html \
bcmxcp.html \
@ -326,7 +400,7 @@ HTML_SERIAL_MANS = \
bestuferrups.html \
bestups.html \
bestfcom.html \
blazer.html \
blazer_ser.html \
clone.html \
dummy-ups.html \
etapro.html \
@ -341,18 +415,21 @@ HTML_SERIAL_MANS = \
metasys.html \
mge-shut.html \
mge-utalk.html \
nutdrv_qx.html \
oneac.html \
microdowell.html \
optiups.html \
powercom.html \
powerpanel.html \
rhino.html \
riello_ser.html \
safenet.html \
solis.html \
tripplite.html \
tripplitesu.html \
upscode2.html \
victronups.html
victronups.html \
apcupsd-ups.html
# (--with-snmp)
SRC_SNMP_PAGES = snmp-ups.txt
@ -367,13 +444,20 @@ HTML_SNMP_MANS = snmp-ups.html
# (--with-usb)
SRC_USB_LIBUSB_PAGES = \
bcmxcp_usb.txt \
blazer-common.txt \
blazer_usb.txt \
nutdrv_qx.txt \
richcomm_usb.txt \
riello_usb.txt \
tripplite_usb.txt \
usbhid-ups.txt
MAN_USB_LIBUSB_PAGES = \
bcmxcp_usb.8 \
blazer_usb.8 \
nutdrv_qx.8 \
richcomm_usb.8 \
riello_usb.8 \
tripplite_usb.8 \
usbhid-ups.8
@ -383,7 +467,10 @@ endif
HTML_USB_LIBUSB_MANS = \
bcmxcp_usb.html \
blazer_usb.html \
nutdrv_qx.html \
richcomm_usb.html \
riello_usb.html \
tripplite_usb.html \
usbhid-ups.html
@ -496,25 +583,24 @@ if HAVE_ASCIIDOC
--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@"
### Prior to Asciidoc ~8.6.8, the --destination-dir flag didn't seem to affect the location of the intermediate .xml file.
A2X_MANPAGE_OPTS = --doctype manpage --format manpage \
--attribute mansource="Network UPS Tools" \
--attribute manversion="@PACKAGE_VERSION@" \
--attribute manmanual="NUT Manual" \
--destination-dir=.
.txt.1:
test -f `basename $<` || cp -p $< .
$(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
$(A2X) $(A2X_MANPAGE_OPTS) $<
.txt.3:
test -f `basename $<` || cp -p $< .
$(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
$(A2X) $(A2X_MANPAGE_OPTS) $<
.txt.5:
test -f `basename $<` || cp -p $< .
$(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
$(A2X) $(A2X_MANPAGE_OPTS) $<
.txt.8:
test -f `basename $<` || cp -p $< .
$(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
$(A2X) $(A2X_MANPAGE_OPTS) $<
else !HAVE_ASCIIDOC

View file

@ -1,9 +1,9 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# Makefile.in generated by automake 1.11.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@ -29,6 +29,23 @@
# FIXME: investigate an autogen.sh hook
# - Ref: http://www.gnu.org/software/hello/manual/automake/Man-pages.html
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -78,8 +95,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_compare_version.m4 \
$(top_srcdir)/m4/nut_check_libltdl.m4 \
$(top_srcdir)/m4/nut_check_libneon.m4 \
$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
$(top_srcdir)/m4/nut_check_libnss.m4 \
$(top_srcdir)/m4/nut_check_libopenssl.m4 \
$(top_srcdir)/m4/nut_check_libpowerman.m4 \
$(top_srcdir)/m4/nut_check_libssl.m4 \
$(top_srcdir)/m4/nut_check_libusb.m4 \
$(top_srcdir)/m4/nut_check_libwrap.m4 \
$(top_srcdir)/m4/nut_check_os.m4 \
@ -95,6 +113,11 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@ -116,6 +139,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
man1dir = $(mandir)/man1
am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \
"$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"
@ -130,6 +159,7 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
ASCIIDOC = @ASCIIDOC@
ASPELL = @ASPELL@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@ -156,6 +186,7 @@ DOC_BUILD_LIST = @DOC_BUILD_LIST@
DRIVER_BUILD_LIST = @DRIVER_BUILD_LIST@
DRIVER_INSTALL_TARGET = @DRIVER_INSTALL_TARGET@
DRIVER_MAN_LIST = @DRIVER_MAN_LIST@
DRVPATH = @DRVPATH@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
@ -407,10 +438,13 @@ HTML_CGI_MANS = \
# Development (--with-dev) related manpages
SRC_DEV_PAGES = \
upsclient.txt \
upscli_add_host_cert.txt \
upscli_cleanup.txt \
upscli_connect.txt \
upscli_disconnect.txt \
upscli_fd.txt \
upscli_get.txt \
upscli_init.txt \
upscli_list_next.txt \
upscli_list_start.txt \
upscli_readline.txt \
@ -420,6 +454,13 @@ SRC_DEV_PAGES = \
upscli_ssl.txt \
upscli_strerror.txt \
upscli_upserror.txt \
libnutclient.txt \
libnutclient_commands.txt \
libnutclient_devices.txt \
libnutclient_general.txt \
libnutclient_misc.txt \
libnutclient_tcp.txt \
libnutclient_variables.txt \
nutscan.txt \
nutscan_scan_snmp.txt \
nutscan_scan_usb.txt \
@ -427,6 +468,7 @@ SRC_DEV_PAGES = \
nutscan_scan_nut.txt \
nutscan_scan_avahi.txt \
nutscan_scan_ipmi.txt \
nutscan_scan_eaton_serial.txt \
nutscan_display_ups_conf.txt \
nutscan_display_parsable.txt \
nutscan_cidr_to_ip.txt \
@ -435,15 +477,21 @@ SRC_DEV_PAGES = \
nutscan_add_option_to_device.txt \
nutscan_add_device_to_device.txt \
nutscan_init.txt \
nutscan_get_serial_ports_list.txt \
libupsclient-config.txt \
skel.txt
# NOTE: nutclient_*.3 has no source counterpart (libnutclient_*.txt)
MAN3_DEV_PAGES = \
upsclient.3 \
upscli_add_host_cert.3 \
upscli_cleanup.3 \
upscli_connect.3 \
upscli_disconnect.3 \
upscli_fd.3 \
upscli_get.3 \
upscli_init.3 \
upscli_list_next.3 \
upscli_list_start.3 \
upscli_readline.3 \
@ -453,6 +501,40 @@ MAN3_DEV_PAGES = \
upscli_ssl.3 \
upscli_strerror.3 \
upscli_upserror.3 \
libnutclient.3 \
libnutclient_commands.3 \
libnutclient_devices.3 \
libnutclient_general.3 \
libnutclient_misc.3 \
libnutclient_tcp.3 \
libnutclient_variables.3 \
nutclient_authenticate.3 \
nutclient_destroy.3 \
nutclient_device_forced_shutdown.3 \
nutclient_device_login.3 \
nutclient_device_master.3 \
nutclient_execute_device_command.3 \
nutclient_get_device_command_description.3 \
nutclient_get_device_commands.3 \
nutclient_get_device_description.3 \
nutclient_get_device_num_logins.3 \
nutclient_get_device_rw_variables.3 \
nutclient_get_devices.3 \
nutclient_get_device_variable_description.3 \
nutclient_get_device_variables.3 \
nutclient_get_device_variable_values.3 \
nutclient_has_device.3 \
nutclient_has_device_command.3 \
nutclient_has_device_variable.3 \
nutclient_logout.3 \
nutclient_set_device_variable_value.3 \
nutclient_set_device_variable_values.3 \
nutclient_tcp_create_client.3 \
nutclient_tcp_disconnect.3 \
nutclient_tcp_get_timeout.3 \
nutclient_tcp_is_connected.3 \
nutclient_tcp_reconnect.3 \
nutclient_tcp_set_timeout.3 \
nutscan.3 \
nutscan_scan_snmp.3 \
nutscan_scan_usb.3 \
@ -460,6 +542,7 @@ MAN3_DEV_PAGES = \
nutscan_scan_nut.3 \
nutscan_scan_avahi.3 \
nutscan_scan_ipmi.3 \
nutscan_scan_eaton_serial.3 \
nutscan_display_ups_conf.3 \
nutscan_display_parsable.3 \
nutscan_cidr_to_ip.3 \
@ -467,6 +550,7 @@ MAN3_DEV_PAGES = \
nutscan_free_device.3 \
nutscan_add_option_to_device.3 \
nutscan_add_device_to_device.3 \
nutscan_get_serial_ports_list.3 \
nutscan_init.3
MAN1_DEV_PAGES = \
@ -477,10 +561,13 @@ MAN1_DEV_PAGES = \
# WITH_DEV
HTML_DEV_MANS = \
upsclient.html \
upscli_add_host_cert.html \
upscli_cleanup.html \
upscli_connect.html \
upscli_disconnect.html \
upscli_fd.html \
upscli_get.html \
upscli_init.html \
upscli_list_next.html \
upscli_list_start.html \
upscli_readline.html \
@ -490,6 +577,13 @@ HTML_DEV_MANS = \
upscli_ssl.html \
upscli_strerror.html \
upscli_upserror.html \
libnutclient.html \
libnutclient_commands.html \
libnutclient_devices.html \
libnutclient_general.html \
libnutclient_misc.html \
libnutclient_tcp.html \
libnutclient_variables.html \
nutscan.html \
nutscan_scan_snmp.html \
nutscan_scan_usb.html \
@ -497,6 +591,7 @@ HTML_DEV_MANS = \
nutscan_scan_nut.html \
nutscan_scan_avahi.html \
nutscan_scan_ipmi.html \
nutscan_scan_eaton_serial.html \
nutscan_display_ups_conf.html \
nutscan_display_parsable.html \
nutscan_cidr_to_ip.html \
@ -504,6 +599,7 @@ HTML_DEV_MANS = \
nutscan_free_device.html \
nutscan_add_option_to_device.html \
nutscan_add_device_to_device.html \
nutscan_get_serial_ports_list.html \
nutscan_init.html \
libupsclient-config.html \
skel.html
@ -511,6 +607,7 @@ HTML_DEV_MANS = \
# (--with-serial)
@SOME_DRIVERS_FALSE@SRC_SERIAL_PAGES = \
@SOME_DRIVERS_FALSE@ al175.txt \
@SOME_DRIVERS_FALSE@ apcsmart.txt \
@SOME_DRIVERS_FALSE@ apcsmart-old.txt \
@SOME_DRIVERS_FALSE@ bcmxcp.txt \
@ -520,7 +617,8 @@ HTML_DEV_MANS = \
@SOME_DRIVERS_FALSE@ bestuferrups.txt \
@SOME_DRIVERS_FALSE@ bestups.txt \
@SOME_DRIVERS_FALSE@ bestfcom.txt \
@SOME_DRIVERS_FALSE@ blazer.txt \
@SOME_DRIVERS_FALSE@ blazer-common.txt \
@SOME_DRIVERS_FALSE@ blazer_ser.txt \
@SOME_DRIVERS_FALSE@ clone.txt \
@SOME_DRIVERS_FALSE@ dummy-ups.txt \
@SOME_DRIVERS_FALSE@ etapro.txt \
@ -537,18 +635,22 @@ HTML_DEV_MANS = \
@SOME_DRIVERS_FALSE@ mge-utalk.txt \
@SOME_DRIVERS_FALSE@ oneac.txt \
@SOME_DRIVERS_FALSE@ microdowell.txt \
@SOME_DRIVERS_FALSE@ nutdrv_qx.txt \
@SOME_DRIVERS_FALSE@ optiups.txt \
@SOME_DRIVERS_FALSE@ powercom.txt \
@SOME_DRIVERS_FALSE@ powerpanel.txt \
@SOME_DRIVERS_FALSE@ rhino.txt \
@SOME_DRIVERS_FALSE@ riello_ser.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@ victronups.txt \
@SOME_DRIVERS_FALSE@ apcupsd-ups.txt
@SOME_DRIVERS_FALSE@MAN_SERIAL_PAGES = \
@SOME_DRIVERS_FALSE@ al175.8 \
@SOME_DRIVERS_FALSE@ apcsmart.8 \
@SOME_DRIVERS_FALSE@ apcsmart-old.8 \
@SOME_DRIVERS_FALSE@ bcmxcp.8 \
@ -558,7 +660,7 @@ HTML_DEV_MANS = \
@SOME_DRIVERS_FALSE@ bestuferrups.8 \
@SOME_DRIVERS_FALSE@ bestups.8 \
@SOME_DRIVERS_FALSE@ bestfcom.8 \
@SOME_DRIVERS_FALSE@ blazer.8 \
@SOME_DRIVERS_FALSE@ blazer_ser.8 \
@SOME_DRIVERS_FALSE@ clone.8 \
@SOME_DRIVERS_FALSE@ dummy-ups.8 \
@SOME_DRIVERS_FALSE@ etapro.8 \
@ -573,20 +675,24 @@ HTML_DEV_MANS = \
@SOME_DRIVERS_FALSE@ metasys.8 \
@SOME_DRIVERS_FALSE@ mge-shut.8 \
@SOME_DRIVERS_FALSE@ mge-utalk.8 \
@SOME_DRIVERS_FALSE@ nutdrv_qx.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@ riello_ser.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@ victronups.8 \
@SOME_DRIVERS_FALSE@ apcupsd-ups.8
@SOME_DRIVERS_FALSE@HTML_SERIAL_MANS = \
@SOME_DRIVERS_FALSE@ al175.html \
@SOME_DRIVERS_FALSE@ apcsmart.html \
@SOME_DRIVERS_FALSE@ apcsmart-old.html \
@SOME_DRIVERS_FALSE@ bcmxcp.html \
@ -596,7 +702,7 @@ HTML_DEV_MANS = \
@SOME_DRIVERS_FALSE@ bestuferrups.html \
@SOME_DRIVERS_FALSE@ bestups.html \
@SOME_DRIVERS_FALSE@ bestfcom.html \
@SOME_DRIVERS_FALSE@ blazer.html \
@SOME_DRIVERS_FALSE@ blazer_ser.html \
@SOME_DRIVERS_FALSE@ clone.html \
@SOME_DRIVERS_FALSE@ dummy-ups.html \
@SOME_DRIVERS_FALSE@ etapro.html \
@ -611,18 +717,21 @@ HTML_DEV_MANS = \
@SOME_DRIVERS_FALSE@ metasys.html \
@SOME_DRIVERS_FALSE@ mge-shut.html \
@SOME_DRIVERS_FALSE@ mge-utalk.html \
@SOME_DRIVERS_FALSE@ nutdrv_qx.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@ riello_ser.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
@SOME_DRIVERS_FALSE@ victronups.html \
@SOME_DRIVERS_FALSE@ apcupsd-ups.html
# (--with-snmp)
@ -633,19 +742,29 @@ HTML_DEV_MANS = \
# (--with-usb)
@SOME_DRIVERS_FALSE@SRC_USB_LIBUSB_PAGES = \
@SOME_DRIVERS_FALSE@ bcmxcp_usb.txt \
@SOME_DRIVERS_FALSE@ blazer-common.txt \
@SOME_DRIVERS_FALSE@ blazer_usb.txt \
@SOME_DRIVERS_FALSE@ nutdrv_qx.txt \
@SOME_DRIVERS_FALSE@ richcomm_usb.txt \
@SOME_DRIVERS_FALSE@ riello_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@ blazer_usb.8 \
@SOME_DRIVERS_FALSE@ nutdrv_qx.8 \
@SOME_DRIVERS_FALSE@ richcomm_usb.8 \
@SOME_DRIVERS_FALSE@ riello_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@ blazer_usb.html \
@SOME_DRIVERS_FALSE@ nutdrv_qx.html \
@SOME_DRIVERS_FALSE@ richcomm_usb.html \
@SOME_DRIVERS_FALSE@ riello_usb.html \
@SOME_DRIVERS_FALSE@ tripplite_usb.html \
@SOME_DRIVERS_FALSE@ usbhid-ups.html
@ -721,9 +840,13 @@ HTML_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@"
### Prior to Asciidoc ~8.6.8, the --destination-dir flag didn't seem to affect the location of the intermediate .xml file.
@HAVE_ASCIIDOC_TRUE@A2X_MANPAGE_OPTS = --doctype manpage --format manpage \
@HAVE_ASCIIDOC_TRUE@ --attribute mansource="Network UPS Tools" \
@HAVE_ASCIIDOC_TRUE@ --attribute manversion="@PACKAGE_VERSION@" \
@HAVE_ASCIIDOC_TRUE@ --attribute manmanual="NUT Manual" \
@HAVE_ASCIIDOC_TRUE@ --destination-dir=.
all: all-am
.SUFFIXES:
@ -766,9 +889,18 @@ clean-libtool:
-rm -rf .libs _libs
install-man1: $(man1_MANS)
@$(NORMAL_INSTALL)
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
@list1='$(man1_MANS)'; \
list2=''; \
test -n "$(man1dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.1[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
@ -795,14 +927,21 @@ uninstall-man1:
files=`{ for i in $$list; do echo "$$i"; done; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
test -z "$$files" || { \
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
install-man3: $(man3_MANS)
@$(NORMAL_INSTALL)
test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
@list='$(man3_MANS)'; test -n "$(man3dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
@list1='$(man3_MANS)'; \
list2=''; \
test -n "$(man3dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.3[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
@ -829,14 +968,21 @@ uninstall-man3:
files=`{ for i in $$list; do echo "$$i"; done; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
test -z "$$files" || { \
echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
install-man5: $(man5_MANS)
@$(NORMAL_INSTALL)
test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
@list='$(man5_MANS)'; test -n "$(man5dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
@list1='$(man5_MANS)'; \
list2=''; \
test -n "$(man5dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.5[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
@ -863,14 +1009,21 @@ uninstall-man5:
files=`{ for i in $$list; do echo "$$i"; done; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
test -z "$$files" || { \
echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
install-man8: $(man8_MANS)
@$(NORMAL_INSTALL)
test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
@list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \
{ for i in $$list; do echo "$$i"; done; \
@list1='$(man8_MANS)'; \
list2=''; \
test -n "$(man8dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.8[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
@ -897,9 +1050,7 @@ uninstall-man8:
files=`{ for i in $$list; do echo "$$i"; done; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
test -z "$$files" || { \
echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
@ -967,10 +1118,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
@ -1083,20 +1239,16 @@ html-man: $(HTML_MANS) man-index.html
@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@ $(A2X) $(A2X_MANPAGE_OPTS) $<
@HAVE_ASCIIDOC_TRUE@.txt.3:
@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< .
@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) $<
@HAVE_ASCIIDOC_TRUE@.txt.5:
@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< .
@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) $<
@HAVE_ASCIIDOC_TRUE@.txt.8:
@HAVE_ASCIIDOC_TRUE@ test -f `basename $<` || cp -p $< .
@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) `basename $<`
@HAVE_ASCIIDOC_TRUE@ $(A2X) $(A2X_MANPAGE_OPTS) $<
@HAVE_ASCIIDOC_FALSE@.txt.html:
@HAVE_ASCIIDOC_FALSE@ @echo "Not (re)building $@ manual page, since 'asciidoc' was not found."

187
docs/man/al175.8 Normal file
View file

@ -0,0 +1,187 @@
'\" t
.\" Title: al175
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 11/20/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools 2.7.1
.\" Language: English
.\"
.TH "AL175" "8" "11/20/2013" "Network UPS Tools 2\&.7\&.1" "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"
al175 \- Driver for Eltek UPS models with AL175 alarm module
.SH "NOTE"
.sp
This man page only documents the hardware\-specific features of the \fBal175\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&.
.SH "SUPPORTED HARDWARE"
.sp
The \fBal175\fR driver is known to work with the following UPSes:
.sp
.if n \{\
.RS 4
.\}
.nf
Eltek MPSU4000 with AL175 alarm module
.fi
.if n \{\
.RE
.\}
.sp
It may also work with other UPSes equiped with AL175 alarm module, but they have not been tested\&.
.sp
AL175 have to be configured to operate in COMLI mode\&. See documentation supplied with your hardware on how to do it\&.
.SH "EXTRA ARGUMENTS"
.sp
This driver does not support any extra settings in the \fBups.conf\fR(5)\&.
.SH "INSTANT COMMANDS"
.sp
This driver supports some extra commands (see \fBupscmd\fR(8)):
.PP
\fBtest\&.battery\&.start\fR
.RS 4
Start a battery test\&.
.RE
.PP
\fBtest\&.battery\&.stop\fR
.RS 4
Stop a battery test\&.
.RE
.SH "VARIABLES"
.sp
Besides status, this driver reads UPS state into following variables:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBups\&.test\&.result\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBoutput\&.voltage\&.nominal\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBoutput\&.current\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBbattery\&.voltage\&.nominal\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBbattery\&.current\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBbattery\&.temperature\fR
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fBinput\&.transfer\&.boost\&.low\fR
.RE
.SH "KNOWN ISSUES AND BUGS"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
Shutdown is not supported\&. FIXME
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
The driver was reworked to meet the project code quality criteria, without testing on real hardware\&. Some bugs may have crept in\&.
.RE
.SH "AUTHOR"
.sp
Kirill Smelkov <kirr@mns\&.spb\&.ru>
.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/

73
docs/man/al175.txt Normal file
View file

@ -0,0 +1,73 @@
AL175(8)
========
NAME
----
al175 - Driver for Eltek UPS models with AL175 alarm module
NOTE
----
This man page only documents the hardware-specific features of the
*al175* driver. For information about the core driver, see
linkman:nutupsdrv[8].
SUPPORTED HARDWARE
------------------
The *al175* driver is known to work with the following UPSes:
Eltek MPSU4000 with AL175 alarm module
It may also work with other UPSes equiped with AL175 alarm module,
but they have not been tested.
AL175 have to be configured to operate in COMLI mode.
See documentation supplied with your hardware on how to do it.
EXTRA ARGUMENTS
---------------
This driver does not support any extra settings in the
linkman:ups.conf[5].
INSTANT COMMANDS
----------------
This driver supports some extra commands (see linkman:upscmd[8]):
*test.battery.start*::
Start a battery test.
*test.battery.stop*::
Stop a battery test.
VARIABLES
---------
Besides status, this driver reads UPS state into following variables:
- *ups.test.result*
- *output.voltage.nominal*
- *output.current*
- *battery.voltage.nominal*
- *battery.current*
- *battery.temperature*
- *input.transfer.boost.low*
KNOWN ISSUES AND BUGS
---------------------
* Shutdown is not supported. FIXME
* The driver was reworked to meet the project code quality criteria, without
testing on real hardware. Some bugs may have crept in.
AUTHOR
------
Kirill Smelkov <kirr@mns.spb.ru>
SEE ALSO
--------
The core driver:
~~~~~~~~~~~~~~~~
linkman:nutupsdrv[8]
Internet resources:
~~~~~~~~~~~~~~~~~~~
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: apcsmart-old
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "APCSMART\-OLD" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "APCSMART\-OLD" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: apcsmart
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 10/30/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.7.1-pre1
.\" Language: English
.\"
.TH "APCSMART" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "APCSMART" "8" "10/30/2013" "Network UPS Tools 2\&.7\&.1\-p" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -133,6 +133,31 @@ You can specify alternate cable in \fBups.conf\fR(5):
Alternatively, you can also provide it on the command line using:
.sp
\-x \fBcable\fR=940\-0095B
.SH "TTY MODES"
.sp
By default the driver works in canonical mode, but it showed to be a problem in windows systems\&. Furthermore there\(cqs a possibility of some obscure serial cards or serial\-usb convertes that could cause problems as well\&. You can use \*(Aqttymode=\*(Aq option to force non\-canonical discipline in \fBups.conf\fR(5):
.sp
\fBttymode\fR=raw
.sp
Alternatively, you can also provide it on the command line using:
.sp
\-x \fBttymode\fR=raw
.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
Any other value will make the driver work in the canonical mode\&.
.sp .5v
.RE
.SH "EXPLANATION OF SHUTDOWN METHODS SUPPORTED BY APC UPSES"
.sp
APC hardware supports a lot of shutdown methods, that themselves can differ in behaviour quite a bit, depending on the model\&.
@ -508,6 +533,9 @@ calibrate\&.start
.\}
calibrate\&.stop
.RE
.SH "PREVIOUS DRIVER VERSION"
.sp
Previous driver is still available as apcsmart\-old \- should there be any need to use earlier version (bugs, incompatiblities with new functionality, etc\&.)\&. In due time apcsmart\-old will be phased out completely, but this won\(cqt happen until the new version gets solid exposure with no pending issues\&.
.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\&.

View file

@ -89,6 +89,22 @@ Alternatively, you can also provide it on the command line using:
-x *cable*=940-0095B
TTY MODES
---------
By default the driver works in canonical mode, but it showed to be a problem in
windows systems. Furthermore there's a possibility of some obscure serial cards
or serial-usb convertes that could cause problems as well. You can use
\'ttymode=' option to force non-canonical discipline in linkman:ups.conf[5]:
*ttymode*=raw
Alternatively, you can also provide it on the command line using:
-x *ttymode*=raw
NOTE: Any other value will make the driver work in the canonical mode.
EXPLANATION OF SHUTDOWN METHODS SUPPORTED BY APC UPSES
------------------------------------------------------
@ -316,6 +332,14 @@ Other supported commands:
- calibrate.start
- calibrate.stop
PREVIOUS DRIVER VERSION
-----------------------
Previous driver is still available as apcsmart-old - should there be any need to
use earlier version (bugs, incompatiblities with new functionality, etc.). In
due time apcsmart-old will be phased out completely, but this won't happen until
the new version gets solid exposure with no pending issues.
BUGS
----

357
docs/man/apcupsd-ups.8 Normal file
View file

@ -0,0 +1,357 @@
'\" t
.\" Title: apcupsd-ups
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 11/18/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools 2.7.1-pre2
.\" Language: English
.\"
.TH "APCUPSD\-UPS" "8" "11/18/2013" "Network UPS Tools 2\&.7\&.1\-p" "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"
apcupsd-ups \- Driver for apcupsd client access
.SH "NOTE"
.sp
This man page only documents the specific features of the \fBapcupsd\-ups\fR driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&.
.SH "DESCRIPTION"
.sp
This driver is a client to \fBapcupsd\fR\&.
.sp
\fBapcupsd\-ups\fR acts as an \fBapcupsd\fR client, simply forwarding data\&. This can be useful in cases where both protocols are required in a network, or in case apcupsd has a required UPS access mode missing from NUT\&.
.SH "EXTRA ARGUMENTS"
.sp
This driver supports the following optional settings in \fBnut.conf\fR(5):
.PP
\fBport\fR=<hostname>[:<port>]
.RS 4
This is the name of a remote host running apcupsd (plus an optional port)\&.
.RE
.sp
For instance:
.sp
.if n \{\
.RS 4
.\}
.nf
[apcupsd]
driver = apcupsd\-ups
port = localhost
desc = "apcupsd client"
.fi
.if n \{\
.RE
.\}
.SH "BACKGROUND"
.sp
This driver was originally written in one evening to allow interworking with \fBapcupsd\fR\&.
.SH "SUPPORTED VARIABLES"
.sp
The following variables are translated from \fBapcupsd\fR to NUT\&. All times should be converted to seconds (please file a bug if you notice a mismatch in units)\&.
.TS
allbox tab(:);
ltB ltB.
T{
apcupsd variable
T}:T{
NUT variable(s)
T}
.T&
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt
lt lt.
T{
.sp
BCHARGE
T}:T{
.sp
battery\&.charge
T}
T{
.sp
MBATTCHG
T}:T{
.sp
battery\&.charge\&.low
T}
T{
.sp
RETPCT
T}:T{
.sp
battery\&.charge\&.restart
T}
T{
.sp
BATTDATE
T}:T{
.sp
battery\&.date
T}
T{
.sp
TIMELEFT
T}:T{
.sp
battery\&.runtime
T}
T{
.sp
MINTIMEL
T}:T{
.sp
battery\&.runtime\&.low
T}
T{
.sp
BATTV
T}:T{
.sp
battery\&.voltage
T}
T{
.sp
NOMBATTV
T}:T{
.sp
battery\&.voltage\&.nominal
T}
T{
.sp
LINEFREQ
T}:T{
.sp
input\&.frequency
T}
T{
.sp
SENSE
T}:T{
.sp
input\&.sensitivity
T}
T{
.sp
HITRANS
T}:T{
.sp
input\&.transfer\&.high
T}
T{
.sp
LOTRANS
T}:T{
.sp
input\&.transfer\&.low
T}
T{
.sp
LASTXFER
T}:T{
.sp
input\&.transfer\&.reason
T}
T{
.sp
LINEV
T}:T{
.sp
input\&.voltage
T}
T{
.sp
MAXLINEV
T}:T{
.sp
input\&.voltage\&.maximum
T}
T{
.sp
MINLINEV
T}:T{
.sp
input\&.voltage\&.minimum
T}
T{
.sp
NOMINV
T}:T{
.sp
input\&.voltage\&.nominal
T}
T{
.sp
LINEFREQ
T}:T{
.sp
output\&.frequency
T}
T{
.sp
OUTPUTV
T}:T{
.sp
output\&.voltage
T}
T{
.sp
NOMOUTV
T}:T{
.sp
output\&.voltage\&.nominal
T}
T{
.sp
DATE
T}:T{
.sp
ups\&.date, ups\&.time
T}
T{
.sp
DSHUTD
T}:T{
.sp
ups\&.delay\&.shutdown
T}
T{
.sp
DWAKE
T}:T{
.sp
ups\&.delay\&.start
T}
T{
.sp
FIRMWARE
T}:T{
.sp
ups\&.firmware, ups\&.firmware\&.aux
T}
T{
.sp
UPSNAME
T}:T{
.sp
ups\&.id
T}
T{
.sp
LOADPCT
T}:T{
.sp
ups\&.load
T}
T{
.sp
MANDATE
T}:T{
.sp
ups\&.mfr\&.date
T}
T{
.sp
NOMPOWER
T}:T{
.sp
ups\&.realpower\&.nominal
T}
T{
.sp
SERIALNO
T}:T{
.sp
ups\&.serial
T}
T{
.sp
STATUS
T}:T{
.sp
ups\&.status
T}
T{
.sp
ITEMP
T}:T{
.sp
ups\&.temperature
T}
T{
.sp
STESTI
T}:T{
.sp
ups\&.test\&.interval
T}
T{
.sp
SELFTEST
T}:T{
.sp
ups\&.test\&.result
T}
.TE
.sp 1
.SH "LIMITATIONS"
.sp
Access to \fBapcupsd\fR is strictly read only: no commands can be issued\&. This stems from the design of \fBapcupsd\fR, where the settings are changed in \fBapctest\fR\&. In order to run \fBapctest\fR, \fBapcupsd\fR must be stopped (and \fBapcupsd\fR exposes the UPS to the network)\&.
.SH "AUTHOR"
.sp
Andreas Steinmetz
.SH "SEE ALSO"
.sp
\fBups.conf\fR(5), \fBnutupsdrv\fR(8)
.SS "Internet Resources:"
.sp
The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/
.sp
The apcupsd home page: http://www\&.apcupsd\&.org/

107
docs/man/apcupsd-ups.txt Normal file
View file

@ -0,0 +1,107 @@
APCUPSD-UPS(8)
==============
NAME
----
apcupsd-ups - Driver for apcupsd client access
NOTE
----
This man page only documents the specific features of the
*apcupsd-ups* driver. For information about the core driver, see
linkman:nutupsdrv[8].
DESCRIPTION
-----------
This driver is a client to *apcupsd*.
*apcupsd-ups* acts as an *apcupsd* client, simply forwarding data.
This can be useful in cases where both protocols are required in a network,
or in case apcupsd has a required UPS access mode missing from NUT.
EXTRA ARGUMENTS
---------------
This driver supports the following optional settings in linkman:nut.conf[5]:
*port*=<hostname>[:<port>]::
This is the name of a remote host running apcupsd (plus an optional port).
For instance:
[apcupsd]
driver = apcupsd-ups
port = localhost
desc = "apcupsd client"
BACKGROUND
----------
This driver was originally written in one evening to allow interworking with *apcupsd*.
SUPPORTED VARIABLES
-------------------
The following variables are translated from *apcupsd* to NUT. All times should be
converted to seconds (please file a bug if you notice a mismatch in units).
[width="50%",cols="m,m",options="header"]
|===============================
| apcupsd variable | NUT variable(s)
| BCHARGE | battery.charge
| MBATTCHG | battery.charge.low
| RETPCT | battery.charge.restart
| BATTDATE | battery.date
| TIMELEFT | battery.runtime
| MINTIMEL | battery.runtime.low
| BATTV | battery.voltage
| NOMBATTV | battery.voltage.nominal
| LINEFREQ | input.frequency
| SENSE | input.sensitivity
| HITRANS | input.transfer.high
| LOTRANS | input.transfer.low
| LASTXFER | input.transfer.reason
| LINEV | input.voltage
| MAXLINEV | input.voltage.maximum
| MINLINEV | input.voltage.minimum
| NOMINV | input.voltage.nominal
| LINEFREQ | output.frequency
| OUTPUTV | output.voltage
| NOMOUTV | output.voltage.nominal
| DATE | ups.date, ups.time
| DSHUTD | ups.delay.shutdown
| DWAKE | ups.delay.start
| FIRMWARE | ups.firmware, ups.firmware.aux
| UPSNAME | ups.id
| LOADPCT | ups.load
| MANDATE | ups.mfr.date
| NOMPOWER | ups.realpower.nominal
| SERIALNO | ups.serial
| STATUS | ups.status
| ITEMP | ups.temperature
| STESTI | ups.test.interval
| SELFTEST | ups.test.result
|===============================
LIMITATIONS
-----------
Access to *apcupsd* is strictly read only: no commands can be issued. This
stems from the design of *apcupsd*, where the settings are changed in
*apctest*. In order to run *apctest*, *apcupsd* must be stopped (and *apcupsd*
exposes the UPS to the network).
AUTHOR
------
Andreas Steinmetz
SEE ALSO
--------
linkman:ups.conf[5],
linkman:nutupsdrv[8]
Internet Resources:
~~~~~~~~~~~~~~~~~~~
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
The apcupsd home page: http://www.apcupsd.org/

View file

@ -23,24 +23,3 @@ 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[]

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: bcmxcp
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "BCMXCP" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "BCMXCP" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: bcmxcp_usb
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "BCMXCP_USB" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "BCMXCP_USB" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: belkin
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "BELKIN" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "BELKIN" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: belkinunv
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "BELKINUNV" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "BELKINUNV" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: bestfcom
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "BESTFCOM" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "BESTFCOM" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: bestfortress
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "BESTFORTRESS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "BESTFORTRESS" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: bestuferrups
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "BESTUFERRUPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "BESTUFERRUPS" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: bestups
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "BESTUPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "BESTUPS" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,17 +1,10 @@
BLAZER(8)
=========
NAME
----
blazer - Driver for Megatec/Q1 protocol serial (blazer_ser) and USB (blazer_usb) based UPS equipment
NOTE
----
This man page only documents the hardware-specific features of the
blazer driver. For information about the core driver, see
linkman:nutupsdrv[8].
SUPPORTED HARDWARE
------------------
@ -24,6 +17,7 @@ but haven't been tested.
All devices with a serial interface (use the *blazer_ser* driver) and
many with a USB interface (use the *blazer_usb* driver) are supported.
EXTRA ARGUMENTS
---------------
@ -61,13 +55,13 @@ somehow, you may want to override this value.
Time to wait before switching on the UPS (minutes). Note that a value below 3
minutes, may cause earlier firmware versions to not switch on automatically,
so it defaults to 3 minutes.
so it defaults to 3 minutes. The acceptable range is +0..9999+ minutes.
*offdelay =* 'value'::
Time to wait before shutting down the UPS (seconds). This value is truncated
to units of 6 seconds (less than 60 seconds) or 60 seconds (more than 60
seconds). Defaults to 30 seconds.
seconds). Defaults to 30 seconds. The acceptable range is +12..600+ seconds.
*norating*::
@ -111,8 +105,10 @@ Minimum battery load used by the driver to estimate the runtime. If not
specified, the driver defaults to 10%. Only used if *runtimecal* is also
specified.
ifndef::blazer_usb[]
SERIAL INTERFACE ONLY
---------------------
~~~~~~~~~~~~~~~~~~~~~
*cablepower =* 'string'::
@ -120,9 +116,12 @@ By default the driver will set DTR and clear RTS ('normal'). If you find that
your UPS isn't detected or the communication with the UPS is unreliable, you may
try if clear DTR and set RTS ('reverse'), set DTR and RTS ('both') or
clear DTR and RTS ('none') improves this situation.
endif::blazer_usb[]
ifdef::blazer_usb[]
USB INTERFACE ONLY
------------------
~~~~~~~~~~~~~~~~~~
*vendorid =* 'regex'::
*productid =* 'regex'::
@ -136,14 +135,12 @@ USB. Each option specifies an extended regular expression (see
string (minus any surrounding whitespace), or the whole 4-digit
hexadecimal code for vendorid and productid. Try *-DD* for
finding out the strings to match.
+
Examples:
-x vendor="Foo.Corporation.*"
-x vendorid=051d # (APC)
-x product=".*(Smart|Back)-?UPS.*"
- `-x vendor="Foo.Corporation.*"`
- `-x vendorid=051d*` (APC)
- `-x product=".*(Smart|Back)-?UPS.*"`
*bus =* 'regex'::
@ -163,6 +160,7 @@ Apply the language ID workaround to the krauler subdriver. This is mandatory
for some devices to work (LDLC, Dynamix and others). You must to provide
*value* (0x409 or 0x4095), according to your device entry in NUT hardware
compatibility list (HCL).
endif::blazer_usb[]
UPS COMMANDS
@ -182,12 +180,12 @@ Turn on the load immediately.
Turn off the load immediately (see <<_known_problems,KNOWN PROBLEMS>>).
*shutdown.return* ['value']::
*shutdown.return*::
Turn off the load and return when power is back. Uses the timers defined by
*ondelay* and *offdelay*.
*shutdown.stayoff* ['value']::
*shutdown.stayoff*::
Turn off the load and remain off (see <<_known_problems,KNOWN PROBLEMS>>). Uses
the timer defined by *offdelay*.
@ -206,13 +204,13 @@ Perform a (10 second) battery test.
*test.battery.start* 'value'::
Perform a battery test for the duration of 'value' seconds (truncated to units of
60 seconds).
Perform a battery test for the duration of 'value' minutes.
*test.battery.stop*::
Stop a running battery test (not available on some hardware.)
BATTERY CHARGE
--------------
@ -253,6 +251,7 @@ linkman:ups.conf[5], so don't complain with the author. If you need something be
buy a UPS that reports *battery.charge* and *battery.runtime* all by itself
without the help of a NUT driver.
NOTES FOR THE PREVIOUS USER OF MEGATEC DRIVERS
----------------------------------------------
@ -274,6 +273,7 @@ You need to use 'cablepower'
This parameter can simply be discarded, since it was a wrong understanding
of the specification.
KNOWN PROBLEMS
--------------
@ -292,19 +292,30 @@ in the status reported by the driver when, in fact, it is working fine.
The temperature and load value is known to be bogus in some models.
AUTHORS
-------
Arjen de Korte <adkorte-guest at alioth.debian.org>,
Alexander Gordeev <lasaine at lvk.cs.msu.su>
SEE ALSO
--------
ifdef::blazer_usb[]
linkman:blazer_ser[8],
endif::blazer_usb[]
ifndef::blazer_usb[]
linkman:blazer_usb[8],
endif::blazer_usb[]
linkman:nutupsdrv[8], linkman:upsc[8], linkman:upscmd[8], linkman:upsrw[8]
Internet Resources:
~~~~~~~~~~~~~~~~~~~
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
The NUT HCL: http://www.networkupstools.org/stable-hcl.html

271
docs/man/blazer_ser.8 Normal file
View file

@ -0,0 +1,271 @@
'\" t
.\" Title: blazer_ser
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 11/17/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools 2.7.1-pre1
.\" Language: English
.\"
.TH "BLAZER_SER" "8" "11/17/2013" "Network UPS Tools 2\&.7\&.1\-p" "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"
blazer_ser \- Driver for Megatec/Q1 protocol serial based UPS equipment
.SH "NOTE"
.sp
This man page only documents the hardware\-specific features of the blazer driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&.
.SH "SUPPORTED HARDWARE"
.sp
The blazer driver is known to work with various UPSes from Blazer, Energy Sistem, Fenton Technologies, General Electric, Mustek and many others\&. The NUT compatibility table lists all the known supported models\&. Keep in mind, however, that other models not listed there may also be supported, but haven\(cqt been tested\&.
.sp
All devices with a serial interface (use the \fBblazer_ser\fR driver) and many with a USB interface (use the \fBblazer_usb\fR driver) are supported\&.
.SH "EXTRA ARGUMENTS"
.sp
You may need to override or provide defaults for some values, depending on the make and model of your UPS\&. The following are the ones that most likely will need changing (see \fBups.conf\fR(5)):
.PP
\fBdefault\&.battery\&.voltage\&.high =\fR \fIvalue\fR
.RS 4
Maximum battery voltage that is reached after about 12 to 24 hours charging\&. If you want the driver to report a guesstimated
\fBbattery\&.charge\fR, you need to specify this (see
BATTERY CHARGE)\&.
.RE
.PP
\fBdefault\&.battery\&.voltage\&.low =\fR \fIvalue\fR
.RS 4
Minimum battery voltage just before the UPS automatically shuts down\&. If you want the driver to report a guesstimated
\fBbattery\&.charge\fR, you need to specify this (see
BATTERY CHARGE)\&.
.RE
.PP
\fBdefault\&.battery\&.voltage\&.nominal =\fR \fIvalue\fR, \fBoverride\&.battery\&.voltage\&.nominal =\fR \fIvalue\fR
.RS 4
Some devices show a wrong nominal battery voltage (or none at all), so you may need to override or set a default value\&.
.RE
.PP
\fBoverride\&.battery\&.packs =\fR \fIvalue\fR
.RS 4
Some devices report a part of the total battery voltage\&. For instance, if
\fBbattery\&.voltage\&.nominal\fR
is 24 V, but it reports a
\fBbattery\&.voltage\fR
of around 2 V, the number of
\fBbattery\&.packs\fR
to correct this reading would be 12\&. The driver will attempt to detect this automatically, but if this fails somehow, you may want to override this value\&.
.RE
.PP
\fBondelay =\fR \fIvalue\fR
.RS 4
Time to wait before switching on the UPS (minutes)\&. Note that a value below 3 minutes, may cause earlier firmware versions to not switch on automatically, so it defaults to 3 minutes\&. The acceptable range is
0\&.\&.9999
minutes\&.
.RE
.PP
\fBoffdelay =\fR \fIvalue\fR
.RS 4
Time to wait before shutting down the UPS (seconds)\&. This value is truncated to units of 6 seconds (less than 60 seconds) or 60 seconds (more than 60 seconds)\&. Defaults to 30 seconds\&. The acceptable range is
12\&.\&.600
seconds\&.
.RE
.PP
\fBnorating\fR
.RS 4
Some UPSes will lock up if you attempt to read rating information from them\&. Setting this flag will make the driver skip this step\&.
.RE
.PP
\fBnovendor\fR
.RS 4
Some UPSes will lock up if you attempt to read vendor information from them\&. Setting this flag will make the driver skip this step\&.
.RE
.PP
\fBprotocol =\fR \fIstring\fR
.RS 4
Skip autodetection of the protocol to use and only use the one specified\&. Supported values
\fImegatec\fR,
\fImegatec/old\fR,
\fImustek\fR
and
\fIzinto\fR\&.
.RE
.PP
\fBruntimecal =\fR \fIvalue,value,value,value\fR
.RS 4
Parameter used in the (optional) runtime estimation\&. This takes two runtimes at different loads\&. Typically, this uses the runtime at full load and the runtime at half load\&. For instance, if your UPS has a rated runtime of 240 seconds at full load and 720 seconds at half load, you would enter
.sp
.if n \{\
.RS 4
.\}
.nf
runtimecal = 240,100,720,50
.fi
.if n \{\
.RE
.\}
.sp
The first load should always be higher than the second\&. If you have values available for loads other than 100 and 50 % respectively, you can use those too, but keep them spaced apart as far as reasonably possible\&. Just don\(cqt get too close to no load (prediction of runtime depends more on idle load for the battery then)\&.
.RE
.PP
\fBchargetime =\fR \fIvalue\fR
.RS 4
The time needed to fully recharge the battery after being fully discharged\&. If not specified, the driver defaults to 43200 seconds (12 hours)\&. Only used if
\fBruntimecal\fR
is also specified\&.
.RE
.PP
\fBidleload =\fR \fIvalue\fR
.RS 4
Minimum battery load used by the driver to estimate the runtime\&. If not specified, the driver defaults to 10%\&. Only used if
\fBruntimecal\fR
is also specified\&.
.RE
.SS "SERIAL INTERFACE ONLY"
.PP
\fBcablepower =\fR \fIstring\fR
.RS 4
By default the driver will set DTR and clear RTS (\fInormal\fR)\&. If you find that your UPS isn\(cqt detected or the communication with the UPS is unreliable, you may try if clear DTR and set RTS (\fIreverse\fR), set DTR and RTS (\fIboth\fR) or clear DTR and RTS (\fInone\fR) improves this situation\&.
.RE
.SH "UPS COMMANDS"
.sp
This driver supports some instant commands (see \fBupscmd\fR(8)):
.PP
\fBbeeper\&.toggle\fR
.RS 4
Toggle the UPS beeper\&. (Not available on some hardware\&.)
.RE
.PP
\fBload\&.on\fR
.RS 4
Turn on the load immediately\&.
.RE
.PP
\fBload\&.off\fR
.RS 4
Turn off the load immediately (see
KNOWN PROBLEMS)\&.
.RE
.PP
\fBshutdown\&.return\fR
.RS 4
Turn off the load and return when power is back\&. Uses the timers defined by
\fBondelay\fR
and
\fBoffdelay\fR\&.
.RE
.PP
\fBshutdown\&.stayoff\fR
.RS 4
Turn off the load and remain off (see
KNOWN PROBLEMS)\&. Uses the timer defined by
\fBoffdelay\fR\&.
.RE
.PP
\fBshutdown\&.stop\fR
.RS 4
Stop a shutdown in progress\&.
.RE
.PP
\fBtest\&.battery\&.start\&.deep\fR
.RS 4
Perform a long battery test (Not available on some hardware\&.)
.RE
.PP
\fBtest\&.battery\&.start\&.quick\fR
.RS 4
Perform a (10 second) battery test\&.
.RE
.PP
\fBtest\&.battery\&.start\fR \fIvalue\fR
.RS 4
Perform a battery test for the duration of
\fIvalue\fR
minutes\&.
.RE
.PP
\fBtest\&.battery\&.stop\fR
.RS 4
Stop a running battery test (not available on some hardware\&.)
.RE
.SH "BATTERY CHARGE"
.sp
Due to popular demand, this driver will report a guesstimated \fBbattery\&.charge\fR and optionally \fBbattery\&.runtime\fR, provided you specified a couple of the EXTRA ARGUMENTS listed above\&.
.sp
If you specify both \fBbattery\&.voltage\&.high\fR and \fBbattery\&.voltage\&.low\fR in \fBups.conf\fR(5), but don\(cqt enter \fBruntimecal\fR, it will guesstimate the state of charge by looking at the battery voltage alone\&. This is not reliable under load, as this only gives reasonably accurate readings if you disconnect the load, let the battery rest for a couple of minutes and then measure the open cell voltage\&. This just isn\(cqt practical if the power went out and the UPS is providing power for your systems\&.
.sp
.if n \{\
.RS 4
.\}
.nf
battery\&.voltage \- battery\&.voltage\&.low
battery\&.charge = \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- x 100 %
battery\&.voltage\&.high \- battery\&.voltage\&.low
.fi
.if n \{\
.RE
.\}
.sp
There is a way to get better readings without disconnecting the load but this requires one to keep track on how much (and how fast) current is going in\- and out of the battery\&. If you specified the \fBruntimecal\fR, the driver will attempt to do this\&. Note however, that this heavily relies on the values you enter and that the UPS must be able to report the load as well\&. There are quite a couple of devices that report 0 % (or any other fixed value) at all times, in which case this obviously doesn\(cqt work\&.
.sp
The driver also has no way of determining the degradation of the battery capacity over time, so you\(cqll have to deal with this yourself (by adjusting the values in \fBruntimecal\fR)\&. Also note that the driver guesses the initial state of charge based on the battery voltage, so this may be less than 100 %, even when you are certain that they are full\&. There is just no way to reliably measure this between 0 and 100 % full charge\&.
.sp
This is better than nothing (but not by much)\&. If any of the above calculations is giving you incorrect readings, you are the one that put in the values in \fBups.conf\fR(5), so don\(cqt complain with the author\&. If you need something better, buy a UPS that reports \fBbattery\&.charge\fR and \fBbattery\&.runtime\fR all by itself without the help of a NUT driver\&.
.SH "NOTES FOR THE PREVIOUS USER OF MEGATEC DRIVERS"
.sp
The blazer drivers having replaced the megatec ones, some configuration changes may be required by users switching to blazer\&.
.sp
Part of this, the following megatec options, in ups\&.conf, have to be changed:
.PP
\fBbattvolts\fR
.RS 4
You need to use
\fIdefault\&.battery\&.voltage\&.high\fR
and
\fIdefault\&.battery\&.voltage\&.low\fR
.RE
.PP
\fBdtr and rts\fR
.RS 4
You need to use
\fIcablepower\fR
.RE
.PP
\fBignoreoff\fR
.RS 4
This parameter can simply be discarded, since it was a wrong understanding of the specification\&.
.RE
.SH "KNOWN PROBLEMS"
.sp
Some UPS commands aren\(cqt supported by all models\&. In most cases, the driver will send a message to the system log when the user tries to execute an unsupported command\&. Unfortunately, some models don\(cqt even provide a way for the driver to check for this, so the unsupported commands will silently fail\&.
.sp
Both the \fBload\&.off\fR and \fBshutdown\&.stayoff\fR instant commands are meant to turn the load off indefinitely\&. However, some UPS models don\(cqt allow this\&.
.sp
Some models report a bogus value for the beeper status (will always be \fIenabled\fR or \fIdisabled\fR)\&. So, the \fBbeeper\&.toggle\fR command may appear to have no effect in the status reported by the driver when, in fact, it is working fine\&.
.sp
The temperature and load value is known to be bogus in some models\&.
.SH "AUTHORS"
.sp
Arjen de Korte <adkorte\-guest at alioth\&.debian\&.org>, Alexander Gordeev <lasaine at lvk\&.cs\&.msu\&.su>
.SH "SEE ALSO"
.sp
\fBblazer_usb\fR(8), \fBnutupsdrv\fR(8), \fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8)
.SS "Internet Resources:"
.sp
The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/
.sp
The NUT HCL: http://www\&.networkupstools\&.org/stable\-hcl\&.html

10
docs/man/blazer_ser.txt Normal file
View file

@ -0,0 +1,10 @@
BLAZER_SER(8)
=============
:blazer_usb!:
NAME
----
blazer_ser - Driver for Megatec/Q1 protocol serial based UPS equipment
include::blazer-common.txt[]

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: blazer
.\" Title: blazer_usb
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 11/18/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.7.1-pre2
.\" Language: English
.\"
.TH "BLAZER" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "BLAZER_USB" "8" "11/18/2013" "Network UPS Tools 2\&.7\&.1\-p" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -28,7 +28,7 @@
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
blazer \- Driver for Megatec/Q1 protocol serial (blazer_ser) and USB (blazer_usb) based UPS equipment
blazer_usb \- Driver for Megatec/Q1 protocol USB based UPS equipment
.SH "NOTE"
.sp
This man page only documents the hardware\-specific features of the blazer driver\&. For information about the core driver, see \fBnutupsdrv\fR(8)\&.
@ -73,12 +73,16 @@ to correct this reading would be 12\&. The driver will attempt to detect this au
.PP
\fBondelay =\fR \fIvalue\fR
.RS 4
Time to wait before switching on the UPS (minutes)\&. Note that a value below 3 minutes, may cause earlier firmware versions to not switch on automatically, so it defaults to 3 minutes\&.
Time to wait before switching on the UPS (minutes)\&. Note that a value below 3 minutes, may cause earlier firmware versions to not switch on automatically, so it defaults to 3 minutes\&. The acceptable range is
0\&.\&.9999
minutes\&.
.RE
.PP
\fBoffdelay =\fR \fIvalue\fR
.RS 4
Time to wait before shutting down the UPS (seconds)\&. This value is truncated to units of 6 seconds (less than 60 seconds) or 60 seconds (more than 60 seconds)\&. Defaults to 30 seconds\&.
Time to wait before shutting down the UPS (seconds)\&. This value is truncated to units of 6 seconds (less than 60 seconds) or 60 seconds (more than 60 seconds)\&. Defaults to 30 seconds\&. The acceptable range is
12\&.\&.600
seconds\&.
.RE
.PP
\fBnorating\fR
@ -131,13 +135,7 @@ Minimum battery load used by the driver to estimate the runtime\&. If not specif
\fBruntimecal\fR
is also specified\&.
.RE
.SH "SERIAL INTERFACE ONLY"
.PP
\fBcablepower =\fR \fIstring\fR
.RS 4
By default the driver will set DTR and clear RTS (\fInormal\fR)\&. If you find that your UPS isn\(cqt detected or the communication with the UPS is unreliable, you may try if clear DTR and set RTS (\fIreverse\fR), set DTR and RTS (\fIboth\fR) or clear DTR and RTS (\fInone\fR) improves this situation\&.
.RE
.SH "USB INTERFACE ONLY"
.SS "USB INTERFACE ONLY"
.PP
\fBvendorid =\fR \fIregex\fR, \fBproductid =\fR \fIregex\fR, \fBvendor =\fR \fIregex\fR, \fBproduct =\fR \fIregex\fR, \fBserial =\fR \fIregex\fR
.RS 4
@ -145,39 +143,46 @@ Select a specific UPS, in case there is more than one connected via USB\&. Each
\fBregex(7)\fR) that must match the UPS\(cqs entire vendor/product/serial string (minus any surrounding whitespace), or the whole 4\-digit hexadecimal code for vendorid and productid\&. Try
\fB\-DD\fR
for finding out the strings to match\&.
.RE
.sp
Examples:
.sp
.if n \{\
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.nf
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-x vendor="Foo\&.Corporation\&.*"
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.nf
\-x vendorid=051d # (APC)
.fi
.if n \{\
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-x vendorid=051d*
(APC)
.RE
.\}
.sp
.if n \{\
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.nf
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-x product="\&.*(Smart|Back)\-?UPS\&.*"
.fi
.if n \{\
.RE
.\}
.RE
.PP
\fBbus =\fR \fIregex\fR
.RS 4
@ -222,7 +227,7 @@ Turn off the load immediately (see
KNOWN PROBLEMS)\&.
.RE
.PP
\fBshutdown\&.return\fR [\fIvalue\fR]
\fBshutdown\&.return\fR
.RS 4
Turn off the load and return when power is back\&. Uses the timers defined by
\fBondelay\fR
@ -230,7 +235,7 @@ and
\fBoffdelay\fR\&.
.RE
.PP
\fBshutdown\&.stayoff\fR [\fIvalue\fR]
\fBshutdown\&.stayoff\fR
.RS 4
Turn off the load and remain off (see
KNOWN PROBLEMS)\&. Uses the timer defined by
@ -256,7 +261,7 @@ Perform a (10 second) battery test\&.
.RS 4
Perform a battery test for the duration of
\fIvalue\fR
seconds (truncated to units of 60 seconds)\&.
minutes\&.
.RE
.PP
\fBtest\&.battery\&.stop\fR
@ -324,7 +329,9 @@ The temperature and load value is known to be bogus in some models\&.
Arjen de Korte <adkorte\-guest at alioth\&.debian\&.org>, Alexander Gordeev <lasaine at lvk\&.cs\&.msu\&.su>
.SH "SEE ALSO"
.sp
\fBnutupsdrv\fR(8), \fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8)
\fBblazer_ser\fR(8), \fBnutupsdrv\fR(8), \fBupsc\fR(8), \fBupscmd\fR(8), \fBupsrw\fR(8)
.SS "Internet Resources:"
.sp
The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/ The NUT HCL: http://www\&.networkupstools\&.org/stable\-hcl\&.html
The NUT (Network UPS Tools) home page: http://www\&.networkupstools\&.org/
.sp
The NUT HCL: http://www\&.networkupstools\&.org/stable\-hcl\&.html

11
docs/man/blazer_usb.txt Normal file
View file

@ -0,0 +1,11 @@
BLAZER_USB(8)
=============
:blazer_usb:
NAME
----
blazer_usb - Driver for Megatec/Q1 protocol USB based UPS equipment
include::blazer-common.txt[]

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: clone
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "CLONE" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "CLONE" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: dummy-ups
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "DUMMY\-UPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "DUMMY\-UPS" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: etapro
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "ETAPRO" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "ETAPRO" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: everups
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "EVERUPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "EVERUPS" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: gamatronic
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "GAMATRONIC" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "GAMATRONIC" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: genericups
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "GENERICUPS" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "GENERICUPS" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -274,7 +274,7 @@ Type 2 has also been reported to work with the 940\-0020C cable\&.
.RE
.\}
.sp
7 = CyberPower Power99 Also Upsonic Power Guardian PG\-500, Belkin Belkin Home Office, F6H350\-SER, F6H500\-SER, F6H650\-SER
7 = CyberPower Power99 Also Upsonic Power Guardian PG\-500, Belkin Belkin Home Office, F6H350\-SER, F6H500\-SER, F6H650\-SER, Eaton Management Card Contact \- Config3 with cable 66033 (shutdown does not work)
.sp
.if n \{\
.RS 4

View file

@ -151,7 +151,8 @@ UPS TYPES
7 = CyberPower Power99
Also Upsonic Power Guardian PG-500, Belkin Belkin Home Office,
F6H350-SER, F6H500-SER, F6H650-SER
F6H350-SER, F6H500-SER, F6H650-SER, Eaton Management Card Contact - Config3
with cable 66033 (shutdown does not work)
[CP=RTS] [OL=CTS] [LB=-DCD] [SD=DTR]

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: hosts.conf
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/08/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 09/13/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.7.1-pre1
.\" Language: English
.\"
.TH "HOSTS\&.CONF" "5" "08/08/2012" "Network UPS Tools" "NUT Manual"
.TH "HOSTS\&.CONF" "5" "09/13/2013" "Network UPS Tools 2\&.7\&.1\-p" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: isbmex
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "ISBMEX" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "ISBMEX" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: ivtscd
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "IVTSCD" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "IVTSCD" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

55
docs/man/libnutclient.3 Normal file
View file

@ -0,0 +1,55 @@
'\" t
.\" Title: libnutclient
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 11/18/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools 2.7.1-pre2
.\" Language: English
.\"
.TH "LIBNUTCLIENT" "3" "11/18/2013" "Network UPS Tools 2\&.7\&.1\-p" "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"
libnutclient \- Network UPS Tools high\-level client access library
.SH "SYNOPSIS"
.sp
.nf
#include <nutclient\&.h>
.fi
.sp
.nf
Refer to this file for more information\&.
.fi
.SH "DESCRIPTION"
.sp
The Network UPS Tools (NUT) \fBnutclient\fR library provides a number of useful functions for programs to use when communicating with \fBupsd\fR(8)\&. It provides high\-level representation of NUT data through client connection, devices, variables and commands\&. Unlike \fBupsclient\fR(3), all low\-level protocol details are hidden\&.
.sp
State is maintained across calls in an opaque structure called NUTCLIENT_t\&. Callers are expected to create one per client connection\&. These will be provided to most of the \fBnutclient\fR functions\&. The format of this structure is subject to change, and client programs must not reference elements within it directly\&.
.sp
NUTCLIENT_t represents the common connection information\&. Derived versions exist for each connection type (NUTCLIENT_TCP_t for TCP connection; actually the unique connection type, NUTCLIENT_TCP_t can be passed as NUTCLIENT_t parameter)\&.
.sp
See the nutclient\&.h header for more information\&.
.SH "ERROR HANDLING"
.sp
There is currently no specific mechanism around error handling\&.
.SH "SEE ALSO"
.sp
\fBlibnutclient_devices\fR(3) \fBlibnutclient_commands\fR(3) \fBlibnutclient_general\fR(3) \fBlibnutclient_misc\fR(3) \fBlibnutclient_tcp\fR(3) \fBlibnutclient_variables\fR(3)

52
docs/man/libnutclient.txt Normal file
View file

@ -0,0 +1,52 @@
LIBNUTCLIENT(3)
===============
NAME
----
libnutclient - Network UPS Tools high-level client access library
SYNOPSIS
--------
#include <nutclient.h>
Refer to this file for more information.
DESCRIPTION
-----------
The Network UPS Tools (NUT) *nutclient* library provides a number of
useful functions for programs to use when communicating with
linkman:upsd[8]. It provides high-level representation of NUT data
through client connection, devices, variables and commands.
Unlike linkman:upsclient[3], all low-level protocol details are
hidden.
State is maintained across calls in an opaque structure called `NUTCLIENT_t`.
Callers are expected to create one per client connection. These will be
provided to most of the *nutclient* functions. The format of this
structure is subject to change, and client programs must not reference
elements within it directly.
`NUTCLIENT_t` represents the common connection information.
Derived versions exist for each connection type (`NUTCLIENT_TCP_t` for
TCP connection; actually the unique connection type, `NUTCLIENT_TCP_t`
can be passed as `NUTCLIENT_t` parameter).
See the `nutclient.h` header for more information.
ERROR HANDLING
--------------
There is currently no specific mechanism around error handling.
SEE ALSO
--------
linkman:libnutclient_devices[3]
linkman:libnutclient_commands[3]
linkman:libnutclient_general[3]
linkman:libnutclient_misc[3]
linkman:libnutclient_tcp[3]
linkman:libnutclient_variables[3]

View file

@ -0,0 +1,65 @@
'\" t
.\" Title: libnutclient_commands
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 09/13/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools 2.7.1-pre1
.\" Language: English
.\"
.TH "LIBNUTCLIENT_COMMAND" "3" "09/13/2013" "Network UPS Tools 2\&.7\&.1\-p" "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"
libnutclient_commands, nutclient_get_device_commands, nutclient_has_device_command, nutclient_get_device_command_description, nutclient_execute_device_command \- Instant command related functions in Network UPS Tools high\-level client access library
.SH "SYNOPSIS"
.sp
.nf
#include <nutclient\&.h>
.fi
.sp
.nf
typedef void* NUTCLIENT_t;
.fi
.sp
.nf
strarr nutclient_get_device_commands(NUTCLIENT_t client, const char* dev);
int nutclient_has_device_command(NUTCLIENT_t client, const char* dev, const char* cmd);
char* nutclient_get_device_command_description(NUTCLIENT_t client, const char* dev, const char* cmd);
void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const char* cmd);
.fi
.SH "DESCRIPTION"
.sp
These functions allow to manage instant commands of devices\&.
.sp
The \fBnutclient_get_device_commands()\fR function retrieve the list of command names for a device\&. The returned strarr must be freed by \fIstrarr_free\fR\&.
.sp
The \fBnutclient_has_device_command\fR function test if the specified command is supported by the device\&. Return 1 is supported and 0 if not\&.
.sp
The \fBnutclient_get_device_command_description\fR function retrieve the command description, if any\&. The resturned string must be freed\&.
.sp
The \fBnutclient_execute_device_command\fR intend to execute the instant command\&.
.sp
\fIdev\fR is the device name\&.
.sp
\fIcmd\fR is the instant command name\&.
.SH "SEE ALSO"
.sp
\fBlibnutclient\fR(3) \fBlibnutclient_devices\fR(3) \fBlibnutclient_general\fR(3)

View file

@ -0,0 +1,47 @@
LIBNUTCLIENT_COMMANDS(3)
========================
NAME
----
libnutclient_commands, nutclient_get_device_commands, nutclient_has_device_command,
nutclient_get_device_command_description, nutclient_execute_device_command -
Instant command related functions in Network UPS Tools high-level client access library
SYNOPSIS
--------
#include <nutclient.h>
typedef void* NUTCLIENT_t;
strarr nutclient_get_device_commands(NUTCLIENT_t client, const char* dev);
int nutclient_has_device_command(NUTCLIENT_t client, const char* dev, const char* cmd);
char* nutclient_get_device_command_description(NUTCLIENT_t client, const char* dev, const char* cmd);
void nutclient_execute_device_command(NUTCLIENT_t client, const char* dev, const char* cmd);
DESCRIPTION
-----------
These functions allow to manage instant commands of devices.
The *nutclient_get_device_commands()* function retrieve the list of command names for a device.
The returned strarr must be freed by 'strarr_free'.
The *nutclient_has_device_command* function test if the specified command is supported by the device.
Return 1 is supported and 0 if not.
The *nutclient_get_device_command_description* function retrieve the command description, if any.
The resturned string must be freed.
The *nutclient_execute_device_command* intend to execute the instant command.
'dev' is the device name.
'cmd' is the instant command name.
SEE ALSO
--------
linkman:libnutclient[3]
linkman:libnutclient_devices[3]
linkman:libnutclient_general[3]

View file

@ -0,0 +1,60 @@
'\" t
.\" Title: libnutclient_devices
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 09/13/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools 2.7.1-pre1
.\" Language: English
.\"
.TH "LIBNUTCLIENT_DEVICES" "3" "09/13/2013" "Network UPS Tools 2\&.7\&.1\-p" "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"
libnutclient_devices, nutclient_get_devices, nutclient_has_device, nutclient_get_device_description \- Device related functions in Network UPS Tools high\-level client access library
.SH "SYNOPSIS"
.sp
.nf
#include <nutclient\&.h>
.fi
.sp
.nf
typedef void* NUTCLIENT_t;
.fi
.sp
.nf
strarr nutclient_get_devices(NUTCLIENT_t client);
int nutclient_has_device(NUTCLIENT_t client, const char* dev);
char* nutclient_get_device_description(NUTCLIENT_t client, const char* dev);
.fi
.SH "DESCRIPTION"
.sp
These functions allow to manage devices\&.
.sp
The \fBnutclient_get_devices()\fR function retrieve the list of devices monitored by a client\&. The returned strarr must be freed by \fIstrarr_free\fR\&.
.sp
The \fBnutclient_has_device()\fR function test if a device is monitored by a client\&.
.sp
The \fBnutclient_get_device_description()\fR function retrieve the device description\&. The returned description string must be freed\&.
.sp
\fIdev\fR is the device name\&.
.SH "SEE ALSO"
.sp
\fBlibnutclient\fR(3) \fBlibnutclient_commands\fR(3) \fBlibnutclient_devices\fR(3) \fBlibnutclient_general\fR(3) \fBlibnutclient_variables\fR(3)

View file

@ -0,0 +1,43 @@
LIBNUTCLIENT_DEVICES(3)
=======================
NAME
----
libnutclient_devices, nutclient_get_devices, nutclient_has_device, nutclient_get_device_description -
Device related functions in Network UPS Tools high-level client access library
SYNOPSIS
--------
#include <nutclient.h>
typedef void* NUTCLIENT_t;
strarr nutclient_get_devices(NUTCLIENT_t client);
int nutclient_has_device(NUTCLIENT_t client, const char* dev);
char* nutclient_get_device_description(NUTCLIENT_t client, const char* dev);
DESCRIPTION
-----------
These functions allow to manage devices.
The *nutclient_get_devices()* function retrieve the list of devices monitored by a client.
The returned strarr must be freed by 'strarr_free'.
The *nutclient_has_device()* function test if a device is monitored by a client.
The *nutclient_get_device_description()* function retrieve the device description.
The returned description string must be freed.
'dev' is the device name.
SEE ALSO
--------
linkman:libnutclient[3]
linkman:libnutclient_commands[3]
linkman:libnutclient_devices[3]
linkman:libnutclient_general[3]
linkman:libnutclient_variables[3]

View file

@ -0,0 +1,67 @@
'\" t
.\" Title: libnutclient_general
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 11/18/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools 2.7.1-pre2
.\" Language: English
.\"
.TH "LIBNUTCLIENT_GENERAL" "3" "11/18/2013" "Network UPS Tools 2\&.7\&.1\-p" "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"
libnutclient_general, nutclient_destroy, strarr_alloc, strarr_free \- General and utility functions in Network UPS Tools high\-level client access library
.SH "SYNOPSIS"
.sp
.nf
#include <nutclient\&.h>
.fi
.sp
.nf
typedef void* NUTCLIENT_t;
.fi
.sp
.nf
void nutclient_destroy(NUTCLIENT_t client);
.fi
.sp
.nf
typedef char** strarr;
.fi
.sp
.nf
strarr strarr_alloc(unsigned short count);
void strarr_free(strarr arr);
.fi
.SH "DESCRIPTION"
.sp
The \fBnutclient_destroy()\fR function destroys a \fINUTCLIENT_t\fR or derived (like \fINUTCLIENT_TCP_t\fR) connection object, and frees allocated memory\&.
.sp
The \fBstrarr\fR type represents an array of C strings (array of char pointer)\&. The array must always be terminated by a NULL pointer\&. Pointed strings must be allocated by (x)calloc or (x)strdup\&.
.sp
The \fBstrarr_alloc()\fR function allocates a \fIstrarr\fR array with the specified number of (non\-initialized) string pointers\&. Another additional pointer set to 0 is added at the end of the array\&.
.sp
The \fBstrarr_free\fR function frees a \fIstrarr\fR array\&. It also frees all pointed strings\&.
.sp
\fIdev\fR is the device name\&.
.SH "SEE ALSO"
.sp
\fBlibnutclient\fR(3)

View file

@ -0,0 +1,45 @@
LIBNUTCLIENT_GENERAL(3)
=======================
NAME
----
libnutclient_general, nutclient_destroy, strarr_alloc, strarr_free -
General and utility functions in Network UPS Tools high-level client access library
SYNOPSIS
--------
#include <nutclient.h>
typedef void* NUTCLIENT_t;
void nutclient_destroy(NUTCLIENT_t client);
typedef char** strarr;
strarr strarr_alloc(unsigned short count);
void strarr_free(strarr arr);
DESCRIPTION
-----------
The *nutclient_destroy()* function destroys a 'NUTCLIENT_t' or derived
(like 'NUTCLIENT_TCP_t') connection object, and frees allocated memory.
The *strarr* type represents an array of C strings (array of char pointer).
The array must always be terminated by a NULL pointer.
Pointed strings must be allocated by (x)calloc or (x)strdup.
The *strarr_alloc()* function allocates a 'strarr' array with the specified
number of (non-initialized) string pointers.
Another additional pointer set to 0 is added at the end of the array.
The *strarr_free* function frees a 'strarr' array.
It also frees all pointed strings.
'dev' is the device name.
SEE ALSO
--------
linkman:libnutclient[3]

View file

@ -0,0 +1,71 @@
'\" t
.\" Title: libnutclient_misc
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 09/13/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools 2.7.1-pre1
.\" Language: English
.\"
.TH "LIBNUTCLIENT_MISC" "3" "09/13/2013" "Network UPS Tools 2\&.7\&.1\-p" "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"
libnutclient_misc, nutclient_authenticate, nutclient_logout, nutclient_device_login, nutclient_get_device_num_logins, nutclient_device_master, nutclient_device_forced_shutdown \- Miscelaneous functions in Network UPS Tools high\-level client access library
.SH "SYNOPSIS"
.sp
.nf
#include <nutclient\&.h>
.fi
.sp
.nf
typedef void* NUTCLIENT_t;
.fi
.sp
.nf
void nutclient_authenticate(NUTCLIENT_t client, const char* login, const char* passwd);
void nutclient_logout(NUTCLIENT_t client);
void nutclient_device_login(NUTCLIENT_t client, const char* dev);
int nutclient_get_device_num_logins(NUTCLIENT_t client, const char* dev);
void nutclient_device_master(NUTCLIENT_t client, const char* dev);
void nutclient_device_forced_shutdown(NUTCLIENT_t client, const char* dev);
.fi
.SH "DESCRIPTION"
.sp
The \fBnutclient_authenticate()\fR function authenticate the user\&.
.sp
\fIlogin\fR is the user name\&.
.sp
\fIpasswd\fR is the user password\&.
.sp
The \fBnutclient_logout()\fR function disconnect gracefully from the server\&.
.sp
The \fBnutclient_device_login()\fR function log the fact that a system is drawing power from this UPS\&.
.sp
The \fBnutclient_get_device_num_logins()\fR function retrieve the number of clients which have been logged for this device\&.
.sp
The \fBnutclient_device_master()\fR function make sure that master\-level functions like FSD are available if necessary\&.
.sp
The \fBnutclient_device_forced_shutdown()\fR function sets the "forced shutdown" flag on the device\&.
.sp
\fIdev\fR is the device name\&.
.SH "SEE ALSO"
.sp
\fBlibnutclient\fR(3)

View file

@ -0,0 +1,52 @@
LIBNUTCLIENT_MISC(3)
====================
NAME
----
libnutclient_misc, nutclient_authenticate, nutclient_logout,
nutclient_device_login, nutclient_get_device_num_logins,
nutclient_device_master, nutclient_device_forced_shutdown -
Miscelaneous functions in Network UPS Tools high-level client access library
SYNOPSIS
--------
#include <nutclient.h>
typedef void* NUTCLIENT_t;
void nutclient_authenticate(NUTCLIENT_t client, const char* login, const char* passwd);
void nutclient_logout(NUTCLIENT_t client);
void nutclient_device_login(NUTCLIENT_t client, const char* dev);
int nutclient_get_device_num_logins(NUTCLIENT_t client, const char* dev);
void nutclient_device_master(NUTCLIENT_t client, const char* dev);
void nutclient_device_forced_shutdown(NUTCLIENT_t client, const char* dev);
DESCRIPTION
-----------
The *nutclient_authenticate()* function authenticate the user.
'login' is the user name.
'passwd' is the user password.
The *nutclient_logout()* function disconnect gracefully from the server.
The *nutclient_device_login()* function log the fact that a system
is drawing power from this UPS.
The *nutclient_get_device_num_logins()* function retrieve the number of clients
which have been logged for this device.
The *nutclient_device_master()* function make sure that master-level
functions like FSD are available if necessary.
The *nutclient_device_forced_shutdown()* function sets the "forced shutdown" flag on the device.
'dev' is the device name.
SEE ALSO
--------
linkman:libnutclient[3]

View file

@ -0,0 +1,73 @@
'\" t
.\" Title: libnutclient_tcp
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 09/13/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools 2.7.1-pre1
.\" Language: English
.\"
.TH "LIBNUTCLIENT_TCP" "3" "09/13/2013" "Network UPS Tools 2\&.7\&.1\-p" "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"
libnutclient_tcp, nutclient_tcp_create_client, nutclient_tcp_is_connected, nutclient_tcp_disconnect, nutclient_tcp_reconnect, nutclient_tcp_set_timeout, nutclient_tcp_get_timeout \- TCP protocol related function for Network UPS Tools high\-level client access library
.SH "SYNOPSIS"
.sp
.nf
#include <nutclient\&.h>
.fi
.sp
.nf
typedef NUTCLIENT_t NUTCLIENT_TCP_t;
.fi
.sp
.nf
NUTCLIENT_TCP_t nutclient_tcp_create_client(const char* host, unsigned short port);
int nutclient_tcp_is_connected(NUTCLIENT_TCP_t client);
void nutclient_tcp_disconnect(NUTCLIENT_TCP_t client);
int nutclient_tcp_reconnect(NUTCLIENT_TCP_t client);
void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, long timeout);
long nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client);
.fi
.SH "DESCRIPTION"
.sp
These functions allow to manage connections to \fBupsd\fR(8) using NUT TCP protocol\&.
.sp
The \fBnutclient_tcp_create_client()\fR function create the \fINUTCLIENT_TCP_t\fR context and intend to connect to upsd at \fIhost\fR and \fIport\fR\&. The context must be freed by \fInutclient_destroy()\fR
.sp
\fIhost\fR can be a sever name or a valid IPv4 or IPv6 adress like "localhost", "127\&.0\&.0\&.1" or "::1"\&.
.sp
\fIport\fR is a valid TCP port, genrally 3493\&.
.sp
The \fBnutclient_tcp_is_connected()\fR function test if the connection is valid\&.
.sp
The \fBnutclient_tcp_disconnect()\fR function force to disconnect the specified connection\&.
.sp
The \fBnutclient_tcp_reconnect()\fR function force to reconnect a connection, disconnecting it if needed\&.
.sp
The \fBnutclient_tcp_set_timeout()\fR function set the timeout duration for I/O operations\&.
.sp
The \fBnutclient_tcp_get_timeout()\fR function retrieve the timeout duration for I/O operations\&.
.sp
\fItimeout\fR values are specified in seconds, negatives values for blocking\&.
.SH "SEE ALSO"
.sp
\fBlibnutclient\fR(3) \fBlibnutclient_general\fR(3)

View file

@ -0,0 +1,54 @@
LIBNUTCLIENT_TCP(3)
===================
NAME
----
libnutclient_tcp, nutclient_tcp_create_client, nutclient_tcp_is_connected,
nutclient_tcp_disconnect, nutclient_tcp_reconnect,
nutclient_tcp_set_timeout, nutclient_tcp_get_timeout -
TCP protocol related function for Network UPS Tools high-level client access library
SYNOPSIS
--------
#include <nutclient.h>
typedef NUTCLIENT_t NUTCLIENT_TCP_t;
NUTCLIENT_TCP_t nutclient_tcp_create_client(const char* host, unsigned short port);
int nutclient_tcp_is_connected(NUTCLIENT_TCP_t client);
void nutclient_tcp_disconnect(NUTCLIENT_TCP_t client);
int nutclient_tcp_reconnect(NUTCLIENT_TCP_t client);
void nutclient_tcp_set_timeout(NUTCLIENT_TCP_t client, long timeout);
long nutclient_tcp_get_timeout(NUTCLIENT_TCP_t client);
DESCRIPTION
-----------
These functions allow to manage connections to linkman:upsd[8] using NUT TCP protocol.
The *nutclient_tcp_create_client()* function create the 'NUTCLIENT_TCP_t' context and
intend to connect to upsd at 'host' and 'port'. The context must be freed by 'nutclient_destroy()'
'host' can be a sever name or a valid IPv4 or IPv6 adress like "localhost", "127.0.0.1" or "::1".
'port' is a valid TCP port, genrally 3493.
The *nutclient_tcp_is_connected()* function test if the connection is valid.
The *nutclient_tcp_disconnect()* function force to disconnect the specified connection.
The *nutclient_tcp_reconnect()* function force to reconnect a connection,
disconnecting it if needed.
The *nutclient_tcp_set_timeout()* function set the timeout duration for I/O operations.
The *nutclient_tcp_get_timeout()* function retrieve the timeout duration for I/O operations.
'timeout' values are specified in seconds, negatives values for blocking.
SEE ALSO
--------
linkman:libnutclient[3]
linkman:libnutclient_general[3]

View file

@ -0,0 +1,78 @@
'\" t
.\" Title: libnutclient_variables
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 09/13/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools 2.7.1-pre1
.\" Language: English
.\"
.TH "LIBNUTCLIENT_VARIABL" "3" "09/13/2013" "Network UPS Tools 2\&.7\&.1\-p" "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"
libnutclient_variables, nutclient_get_device_variables, nutclient_get_device_rw_variables, nutclient_has_device_variable, nutclient_get_device_variable_description, nutclient_get_device_variable_values, nutclient_set_device_variable_value, nutclient_set_device_variable_values \- Variable related functions in Network UPS Tools high\-level client access library
.SH "SYNOPSIS"
.sp
.nf
#include <nutclient\&.h>
.fi
.sp
.nf
typedef void* NUTCLIENT_t;
.fi
.sp
.nf
strarr nutclient_get_device_variables(NUTCLIENT_t client, const char* dev);
strarr nutclient_get_device_rw_variables(NUTCLIENT_t client, const char* dev);
int nutclient_has_device_variable(NUTCLIENT_t client, const char* dev, const char* var);
char* nutclient_get_device_variable_description(NUTCLIENT_t client, const char* dev, const char* var);
strarr nutclient_get_device_variable_values(NUTCLIENT_t client, const char* dev, const char* var);
void nutclient_set_device_variable_value(NUTCLIENT_t client, const char* dev, const char* var, const char* value);
void nutclient_set_device_variable_values(NUTCLIENT_t client, const char* dev, const char* var, const strarr values);
.fi
.SH "DESCRIPTION"
.sp
These functions allow to manage variables of devices\&.
.sp
The \fBnutclient_get_device_variables()\fR function retrieve the list of variables names for a device\&. The returned strarr must be freed by \fIstrarr_free\fR\&.
.sp
The \fBnutclient_get_device_rw_variables\fR function retrieve the list of read\-write variables names for a device\&. The returned strarr must be freed by \fIstrarr_free\fR\&.
.sp
The \fBnutclient_has_device_variable\fR function test if the specified variable is supported by the device\&. Return 1 is supported and 0 if not\&.
.sp
The \fBnutclient_get_device_variable_description\fR function retrieve the variable description, if any\&. The resturned string must be freed\&.
.sp
The \fBnutclient_get_device_variable_values\fR returns variable values (generally only one)\&. The returned strarr must be freed by \fIstrarr_free\fR\&.
.sp
The \fBnutclient_set_device_variable_value\fR intend to set the value of the specified variable\&.
.sp
The \fBnutclient_set_device_variable_values\fR intend to set multiple values of the specified variable\&.
.sp
\fIdev\fR is the device name\&.
.sp
\fIvar\fR is the variable name\&.
.sp
\fIvalue\fR is the variable value\&.
.sp
\fIvalues\fR is the variable array of values\&.
.SH "SEE ALSO"
.sp
\fBlibnutclient\fR(3) \fBlibnutclient_devices\fR(3) \fBlibnutclient_general\fR(3)

View file

@ -0,0 +1,64 @@
LIBNUTCLIENT_VARIABLES(3)
=========================
NAME
----
libnutclient_variables, nutclient_get_device_variables,
nutclient_get_device_rw_variables, nutclient_has_device_variable,
nutclient_get_device_variable_description, nutclient_get_device_variable_values,
nutclient_set_device_variable_value, nutclient_set_device_variable_values -
Variable related functions in Network UPS Tools high-level client access library
SYNOPSIS
--------
#include <nutclient.h>
typedef void* NUTCLIENT_t;
strarr nutclient_get_device_variables(NUTCLIENT_t client, const char* dev);
strarr nutclient_get_device_rw_variables(NUTCLIENT_t client, const char* dev);
int nutclient_has_device_variable(NUTCLIENT_t client, const char* dev, const char* var);
char* nutclient_get_device_variable_description(NUTCLIENT_t client, const char* dev, const char* var);
strarr nutclient_get_device_variable_values(NUTCLIENT_t client, const char* dev, const char* var);
void nutclient_set_device_variable_value(NUTCLIENT_t client, const char* dev, const char* var, const char* value);
void nutclient_set_device_variable_values(NUTCLIENT_t client, const char* dev, const char* var, const strarr values);
DESCRIPTION
-----------
These functions allow to manage variables of devices.
The *nutclient_get_device_variables()* function retrieve the list of variables names for a device.
The returned strarr must be freed by 'strarr_free'.
The *nutclient_get_device_rw_variables* function retrieve the list of read-write variables names for a device.
The returned strarr must be freed by 'strarr_free'.
The *nutclient_has_device_variable* function test if the specified variable is supported by the device.
Return 1 is supported and 0 if not.
The *nutclient_get_device_variable_description* function retrieve the variable description, if any.
The resturned string must be freed.
The *nutclient_get_device_variable_values* returns variable values (generally only one).
The returned strarr must be freed by 'strarr_free'.
The *nutclient_set_device_variable_value* intend to set the value of the specified variable.
The *nutclient_set_device_variable_values* intend to set multiple values of the specified variable.
'dev' is the device name.
'var' is the variable name.
'value' is the variable value.
'values' is the variable array of values.
SEE ALSO
--------
linkman:libnutclient[3]
linkman:libnutclient_devices[3]
linkman:libnutclient_general[3]

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: libupsclient-config
.\" Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/08/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 09/13/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.7.1-pre1
.\" Language: English
.\"
.TH "LIBUPSCLIENT\-CONFIG" "1" "08/08/2012" "Network UPS Tools" "NUT Manual"
.TH "LIBUPSCLIENT\-CONFIG" "1" "09/13/2013" "Network UPS Tools 2\&.7\&.1\-p" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View file

@ -1,13 +1,13 @@
'\" t
.\" Title: liebert-esp2
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 08/07/2012
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\" Date: 07/26/2013
.\" Manual: NUT Manual
.\" Source: Network UPS Tools
.\" Source: Network UPS Tools 2.6.5
.\" Language: English
.\"
.TH "LIEBERT\-ESP2" "8" "08/07/2012" "Network UPS Tools" "NUT Manual"
.TH "LIEBERT\-ESP2" "8" "07/26/2013" "Network UPS Tools 2\&.6\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

Some files were not shown because too many files have changed in this diff Show more